| От | Tom Lane |
|---|---|
| Тема | Re: planner/optimizer question |
| Дата | |
| Msg-id | 23032.1083126479@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | planner/optimizer question (brad-pgperf@duttonbros.com) |
| Ответы |
Re: planner/optimizer question
|
| Список | pgsql-performance |
brad-pgperf@duttonbros.com writes:
> ... Wouldn't the most efficient plan be to scan the index regardless
> of crm_id because the only columns needed are in the index?
No. People coming from other databases often have the misconception
that queries can be answered by looking only at an index. That is never
true in Postgres because row validity info is only stored in the table;
so we must always visit the table entry to make sure the row is still
valid/visible for the current query.
Accordingly, columns added to the index that aren't constrained by the
WHERE clause are not very useful ...
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера