Re: [HACKERS] TODO Item: IN(long list ...)

2006-11-14 Thread Bruce Momjian
Alvaro Herrera wrote:
 Josh Berkus wrote:
  Bruce, all:
  
  This is a longstanding performance issue which just came up again on IRC, 
  and I can't find a TODO item for it.  So I'd like it added to TODO.  
  Suggested phrasing:
  
  -- 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?

Yes.  It was fixed by Joe Conway when it was discovered, so never made
it on the TODO list.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[HACKERS] TODO Item: IN(long list ...)

2006-10-31 Thread Josh Berkus
Bruce, all:

This is a longstanding performance issue which just came up again on IRC, 
and I can't find a TODO item for it.  So I'd like it added to TODO.  
Suggested phrasing:

-- 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.

Corrections?

-- 
--Josh

Josh Berkus
PostgreSQL @ Sun
San Francisco

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [HACKERS] TODO Item: IN(long list ...)

2006-10-31 Thread Alvaro Herrera
Josh Berkus wrote:
 Bruce, all:
 
 This is a longstanding performance issue which just came up again on IRC, 
 and I can't find a TODO item for it.  So I'd like it added to TODO.  
 Suggested phrasing:
 
 -- 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?

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [HACKERS] TODO Item: IN(long list ...)

2006-10-31 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] 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

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate