Re: TODO Item: IN(long list ...)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: TODO Item: IN(long list ...)
Date: 2006-10-31 21:07:31
Message-ID: 8843.1162328851@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Josh Berkus wrote:
>> -- Improve performance of queries with IN() clauses containing hundreds or
>> more literal values, possibly by re-writing it as a join to a virtual
>> table.

> Hmm, wasn't there some work on this regard in 8.2?

I think it's pretty much done. Try WHERE foo IN (VALUES (1),(2),...)
if you have so many values that a non-nestloop join seems indicated.
The plain non-VALUES list form is also significantly faster than it
was, but I think it will only result in a bitmap indexscan plan type.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-10-31 21:10:31 Re: [HACKERS] WAL logging freezing
Previous Message Marc Munro 2006-10-31 20:59:32 Shared Memory Hooks Documentation (was Re: New shared memory hooks proposal)