Re: Have I b0rked something? Slow comparisons on "where x in (...)"

From: Richard Huxton <dev(at)archonet(dot)com>
To: Stephen Harris <lists(at)spuddy(dot)org>
Cc: Dann Corbit <DCorbit(at)connx(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Have I b0rked something? Slow comparisons on "where x in (...)"
Date: 2007-05-03 09:24:56
Message-ID: 4639AA68.2040003@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephen Harris wrote:
> On Wed, May 02, 2007 at 12:45:08PM -0700, Dann Corbit wrote:
>> Have you done a vacuum on the table recently?
>
> We vacuum daily and cluster weekly after the nightly activities have been
> performed.
>
>> IN list, then the IN list might benefit from a bit of analysis for
>
> The IN list is just a set of integers (it's an integer index) generated
> from some selects on other tables earlier in our processing. I don't
> have any choice as to what is in the IN list :-)

Try creating a temporary table, populating with the list and joining
against it. That's probably your best bet for a long list of target values.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message jasme 2007-05-03 09:36:18 WAL
Previous Message Richard Huxton 2007-05-03 09:22:57 Re: forcing use of a specific (expression) index?