"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to