| От | Tom Lane |
|---|---|
| Тема | Re: strange explain |
| Дата | |
| Msg-id | 25474.1021383557@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: strange explain ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>) |
| Список | pgsql-hackers |
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
>> tour=# explain analyze select * from tours where
>> ( operator_id in (2,3,4,5,7) and type_id = 4 ) or
>> ( operator_id = 8 and type_id = 3);
> Actually this plan looks very strange to me. One would expect it to only use
> type_idx twice (in lack of a better index (type_id, operator_id)).
> Seems there is room for another performance improvement here :-)
Yeah, this demonstrates that reducing the quals to canonical form isn't
always the best thing to do.
Or maybe we could just look for duplicate indexqual conditions at the
end of the process?
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера