Re: Damn slow query

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "Magnus Naeslund(f)" <mag(at)fbab(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Damn slow query
Date: 2002-10-09 22:08:33
Message-ID: 20021009150709.L7789-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Wed, 9 Oct 2002, Magnus Naeslund(f) wrote:

> Hello, i've got this query that's really slow...
> Figure this:
>
> testdb=> select now() ; select gid from bs where gid not in ( select x
> from z2test ); select now();

Per FAQ suggestion, try something like
select gid from bs where not exists (select * from z2test where
z2test.x=bs.gid);
to see if it is faster.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2002-10-09 22:08:47 Re: Damn slow query
Previous Message Magnus Naeslund(f) 2002-10-09 21:34:16 Damn slow query