Re: strange explain

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
Cc: "Oleg Bartunov" <oleg(at)sai(dot)msu(dot)su>, "Pgsql Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: strange explain
Date: 2002-05-14 13:39:17
Message-ID: 25474.1021383557@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-05-14 13:40:38 Re: [HACKERS] Bug #659: lower()/upper() bug on
Previous Message Thomas Lockhart 2002-05-14 13:39:02 Re: Interval precision busted?