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

Re: Query too slow with "not in" condition

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Rowley" <dgrowley(at)gmail(dot)com>
Cc: "'????????? ??'" <masivakumar(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Query too slow with "not in" condition
Date: 2008-11-30 17:58:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
"David Rowley" <dgrowley(at)gmail(dot)com> writes:
> I assume workmem, effective_cache_size and random_page_cost are all the same
> in the 2 postgresql.conf?

Indeed, work_mem is probably the problem.  The critical difference
between the two plans seems to be that the first one is using a
"hashed subplan" and the second one isn't.  Assuming the same datatypes
in both databases, the only reason not to use a hashed subplan is if
the hashtable is estimated not to fit in work_mem.

			regards, tom lane

In response to

pgsql-general by date

Next:From: Tom LaneDate: 2008-11-30 18:26:00
Subject: Re: Question on libpq parameters
Previous:From: Scott MarloweDate: 2008-11-30 11:22:18
Subject: Re: db backup script in gentoo

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