Re: strange explain

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Interval precision busted?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Discontent with development process (was:Re: pgaccess - the discussion is over)