Re: NOT IN query takes forever - Mailing list pgsql-performance

From Tom Lane
Subject Re: NOT IN query takes forever
Date
Msg-id 23045.1091545157@sss.pgh.pa.us
Whole thread Raw
In response to Re: NOT IN query takes forever  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-performance
"Merlin Moncure" <merlin.moncure@rcsonline.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

pgsql-performance by date:

Previous
From: "Matthew T. O'Connor"
Date:
Subject: Re: pg_autovacuum parameters
Next
From: Marius Andreiana
Date:
Subject: Re: NOT IN query takes forever