| От | Tom Lane |
|---|---|
| Тема | Re: Seeking help with a query that takes too long |
| Дата | |
| Msg-id | 9083.1068653434@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Seeking help with a query that takes too long ("Nick Fankhauser" <nickf@ontko.com>) |
| Ответы |
Re: Seeking help with a query that takes too long
|
| Список | pgsql-performance |
"Nick Fankhauser" <nickf@ontko.com> writes:
>> Nick, can you find out why this row count estimation is so far off?
> It's actually correct:
Sure, the 3501 was the "actual". The estimate was 1 row, which was
pretty far off :-(
> Here are the stats:
It looks like you are running with the default statistics target (10).
Try boosting it to 100 or even more for this column (see ALTER TABLE
SET STATISTICS, then re-ANALYZE) and see if the estimate gets better.
I think the major problem is likely here:
> n_distinct | 24215
which is no doubt much too small (do you have an idea of the number
of distinct actor_full_name_uppercase values?)
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера