Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: Simon RiggsDate: 2006-10-31 21:10:31
Subject: Re: [HACKERS] WAL logging freezing
Previous:From: Marc MunroDate: 2006-10-31 20:59:32
Subject: Shared Memory Hooks Documentation (was Re: New sharedmemory hooks proposal)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group