Re: Regression in IN( field, field, field ) performance - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Regression in IN( field, field, field ) performance
Date
Msg-id 87wsg1sgo3.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Regression in IN( field, field, field ) performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Regression in IN( field, field, field ) performance  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Works fine for me, eg
...
>    ->  Bitmap Heap Scan on tenk1 b  (cost=0.79..4.82 rows=3 width=244)
>          Recheck Cond: (b.unique2 = ANY (ARRAY[a.unique1, a.ten, a.hundred]))
>          ->  Bitmap Index Scan on tenk1_unique2  (cost=0.00..0.79 rows=3 width=0
> )
>                Index Cond: (b.unique2 = ANY (ARRAY[a.unique1, a.ten, a.hundred])

But that's an index on the lhs of the =ANY which in his example was just a
constant.

> You'll need to provide a concrete test case if you think there's
> something broken here.

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.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services!


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Withdraw PL/Proxy from commitfest
Next
From: Gregory Stark
Date:
Subject: Re: Bitmap Indexes: request for feedback