| От | Tom Lane |
|---|---|
| Тема | Re: Searching for the cause of a bad plan |
| Дата | |
| Msg-id | 6175.1190390913@sss.pgh.pa.us обсуждение |
| Ответ на | Searching for the cause of a bad plan (Csaba Nagy <nagy@ecircle-ag.com>) |
| Ответы |
Re: Searching for the cause of a bad plan
|
| Список | pgsql-performance |
Csaba Nagy <nagy@ecircle-ag.com> writes:
> Looking at Plan 2, it looks like the "limit" step is estimating wrongly
> it's cost.
The reason you get a bad plan is that this rowcount estimate is so far
off:
> -> Index Scan using pk_table_a on table_a ta (cost=0.00..324786.18 rows=388532 width=16) (actual
time=454.389..460.138rows=2 loops=1)
> Index Cond: (a = $1)
Raising the stats target helped no doubt because it didn't overestimate
the number of rows so much...
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера