| От | Dave Dutcher |
|---|---|
| Тема | Re: Bad Row Count Estimate on View with 8.2 |
| Дата | |
| Msg-id | 00d501c7447e$8e227760$8300a8c0@tridecap.com обсуждение исходный текст |
| Ответ на | Re: Bad Row Count Estimate on View with 8.2 (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-performance |
> From: pgsql-performance-owner@postgresql.org > [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Tom Lane > > I took another look and think I found the problem: 8.2's new code for > flattening UNION ALL subqueries into "append relations" is failing to > initialize all the fields of the appendrel, which confuses > estimate_num_groups (and perhaps other places). I think this will fix > it for you. > I gave this a try on our test machine yesterday and it worked. The planner was estimating that the group by on the union would return about 300 rows which is very similar to what 8.1.2 thought. Actually it returned about 3000 rows, but still it is a good enough estimate to pick a plan which takes 100ms instead of a plan which takes 100 seconds. Thanks, Dave
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера