Re: detecting poor query plans
От | Greg Stark |
---|---|
Тема | Re: detecting poor query plans |
Дата | |
Msg-id | 877k1nxg2b.fsf@stark.dyndns.tv обсуждение исходный текст |
Ответ на | detecting poor query plans (Neil Conway <neilc@samurai.com>) |
Ответы |
Re: detecting poor query plans
|
Список | pgsql-hackers |
Neil Conway <neilc@samurai.com> writes: > It occurred to me that these kinds of poor planning decisions could easily > be detected by PostgreSQL itself: after we've finished executing a plan, we > can trivially compare the # of results produced by each node in the query > tree with the # of results the planner expected that node to produce There's a dual to this as well. If the results were very close but the actual time taken to run the node doesn't match the cost calculated then some optimizer parameter needs to be adjusted. Either one of the cost_* parameters or random_page_cost, or effective_cache_size or... I'm not sure it's as obvious what to put in the HINT though. Ideally these results would have to be gathered and pumped through linear optimization algorithms which is a lot more work. -- greg
В списке pgsql-hackers по дате отправления: