Planet PostgreSQL

Planet PostgreSQL -

Bruce Momjian: Explaining the Postgres Query Optimizer Improvements

I wrote Explaining the Postgres Query Optimizer in 2011, and though I have presented it 22 times, it has changed little over the years. (I created a followup presentation this year.) Periodically, I check my slides to make sure they match the output of the current Postgres version. I did this recently using the file associated with the presentation and found that the EXPLAIN plans for the final LIMIT queries were different. I updated my slides, and then went to find the optimizer improvement responsible for this change. After applying a patch to enable compiling of older branches, I found the commit was from January 20, 2017. What was odd is that the patch added logical replication features, and did not modify the optimizer. Thanks to Andrew Gierth, I discovered that the commit changed my EXPLAIN plans because it increased the number of pg_class rows by 3%, and that changed the costs enough to change the EXPLAIN plans. Continue Reading »

该文章介绍了作者在Postgres开源数据库上的工作,使用PgLife监控社区活动。作者更新演示文稿后发现限制查询的解释计划发生了变化,经过调查发现是由于2017年1月20日的提交导致的。

PgLife Postgres 提交 监控 解释计划

相关推荐 去reddit讨论

热榜 Top10

LigaAI
LigaAI
观测云
观测云
eolink
eolink
Dify.AI
Dify.AI

推荐或自荐