Re: Bad Plan for Questionnaire-Type Query
От | Tom Lane |
---|---|
Тема | Re: Bad Plan for Questionnaire-Type Query |
Дата | |
Msg-id | 27080.1243190522@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Bad Plan for Questionnaire-Type Query (David Blewett <david@dawninglight.net>) |
Ответы |
Re: Bad Plan for Questionnaire-Type Query
|
Список | pgsql-performance |
David Blewett <david@dawninglight.net> writes: > I took the time to load this data into an 8.4beta2 install, and the same > query runs in a much more reasonable timeframe (~3s as opposed to ~50s). I > set the statistics target to 500, and got this explain [1]. > 1. http://explain.depesz.com/s/pw Hmm... the join size estimates are no better than before, so I'm afraid that 8.4 is just as vulnerable to picking a bad plan as the previous versions were. I don't think you should assume anything's been fixed. It still feels like this schema design is obscuring correlations that the planner needs to know about in order to make decent estimates. You mentioned earlier that the seemingly unrelated question_ids were linked via a common submission_id. I wonder whether it's possible to query using the submission_id instead? regards, tom lane
В списке pgsql-performance по дате отправления: