Re: Regression in IN( field, field, field ) performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Decibel! <decibel(at)decibel(dot)org>, Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Regression in IN( field, field, field ) performance
Date: 2008-10-23 16:16:16
Message-ID: 10073.1224778576@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> Works fine for me, eg

> I think he's looking for something like:
> 5 IN (col1,col2,col3)
> resulting in a bitmap or of three index scans of three different indexes on
> col1, col2, and col3.

Ah, I see. It would be easy to make transformAExprIn() generate an OR
tree instead of = ANY(ARRAY[]), if we could figure out the conditions
where an OR tree is superior. I'm not sure it's easy to tell though.
Is it sufficient to do this when there are Vars on the right side and
none on the left?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-10-23 16:21:48 Re: Block level concurrency during recovery
Previous Message Magnus Hagander 2008-10-23 16:07:16 Re: SSL cleanups/hostname verification