pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Marius Andreiana <mandreiana@rdslink.ro>
Cc: pgsql-performance@postgresql.org
Subject: Re: NOT IN query takes forever
Date: Tue, 3 Aug 2004 07:03:31 -0700 (PDT)
Message-ID: <20040803065928.Y88907@megazone.bigpanda.com> (raw)
In-Reply-To: <1091522942.4936.5.camel@marte.biciclete.ro>
References: <1091522942.4936.5.camel@marte.biciclete.ro>


On Tue, 3 Aug 2004, Marius Andreiana wrote:

> I just vacuum analyse'd the database.
>
> Trying to run this query:
> EXPLAIN ANALYSE
> select * FROM trans
> WHERE query_id NOT IN (select query_id FROM query)
>
> but it will remain like that forever (cancelled after 30 min).
>
> My postgresql.conf is the default:
> # - Memory -
>
> shared_buffers = 1000           # min 16, at least max_connections*2,
> 8KB each
> #sort_mem = 1024                # min 64, size in KB
> #vacuum_mem = 8192              # min 1024, size in KB
>
> Should I adjust something?

Probably sort_mem.  It's probably estimating that it can't hash the result
into the 1MB of sort_mem so it's probably falling back to some sort of
nested execution.




view thread (10+ messages)  latest in thread

Message-ID: <20040803065928.Y88907@megazone.bigpanda.com>
Permalink:  ../20040803065928.Y88907@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20040803065928.Y88907@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, mandreiana@rdslink.ro
  Subject: Re: NOT IN query takes forever
  In-Reply-To: <20040803065928.Y88907@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox