pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Timo Nentwig <timo@nitwit.de>
Cc: pgsql-performance@postgresql.org
Cc: support@postgresql.org
Subject: Re: Bug in optimizer
Date: Tue, 4 May 2004 11:36:19 -0500
Message-ID: <20040504163619.GB10698@wolff.to> (raw)
In-Reply-To: <40966E77.4020004@nitwit.de>
References: <40966E77.4020004@nitwit.de>

On Mon, May 03, 2004 at 18:08:23 +0200,
  Timo Nentwig <timo@nitwit.de> wrote:
> 
> This is very slow:

This kind of question should be asked on the performance list.

> 
> SELECT urls.id FROM urls WHERE
> (
> 	urls.id <> ALL (SELECT html.urlid FROM html)
> );
> 
> ...while this is quite fast:

You didn't provide your postgres version or an explain analyze so it is hard
to answer your question definitivly. Most likely you are using a pre 7.4
version which is know to be slow for IN (which is what the above probably
gets translated to).

> 
> SELECT urls.id FROM urls WHERE
> (
> 	NOT (EXISTS (SELECT html.urlid FROM tml WHERE
> 	(
> 		html.urlid = urls.id
> 	)))
> );



view thread (3+ messages)  latest in thread

Message-ID: <20040504163619.GB10698@wolff.to>
Permalink:  ../20040504163619.GB10698@wolff.to/
Also on:    postgresql.org/message-id/20040504163619.GB10698@wolff.to

 · 

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: bruno@wolff.to, timo@nitwit.de, support@postgresql.org
  Subject: Re: Bug in optimizer
  In-Reply-To: <20040504163619.GB10698@wolff.to>

* 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