| От | Tom Lane |
|---|---|
| Тема | Re: Weird indices |
| Дата | |
| Msg-id | 10763.982636474@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Weird indices (Joseph Shraibman <jks@selectacast.net>) |
| Список | pgsql-general |
Joseph Shraibman <jks@selectacast.net> writes:
> This raises some other questions. Why can't postgres get the count(*)
> from the index? Why doesn't it predict the correct number of rows in
> the planner? (25 estimated vs 16 actual).
The name of the game here is to make a plan *without* actually going
out and expending large amounts of time to find out the true state of
affairs; by the time you know for sure, you've already done the query.
We have to do a certain amount of guessing, otherwise the planner will
be a net drag on performance. Accordingly, the estimates will never be
perfectly accurate.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера