Re: NOT IN query takes forever

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: "Marius Andreiana" <mandreiana(at)rdslink(dot)ro>, pgsql-performance(at)postgresql(dot)org
Subject: Re: NOT IN query takes forever
Date: 2004-08-03 14:59:17
Message-ID: 23045.1091545157@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> writes:
> Try bumping up shared buffers some and sort mem as much as you safely
> can.

sort_mem is probably the issue here. The only reasonable way to do NOT
IN is with a hash table, and the default setting of sort_mem is probably
too small to support a 137042-element table.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2004-08-03 15:05:28 Trying to use GIST indexes again
Previous Message Tom Lane 2004-08-03 14:39:39 Re: Out of swap space & memory

Browse pgsql-performance by date

  From Date Subject
Next Message Gaetano Mendola 2004-08-03 15:54:44 Re: pg_autovacuum parameters
Previous Message Matthew T. O'Connor 2004-08-03 14:19:32 Re: pg_autovacuum parameters