Re: Bug in optimizer

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Bug in optimizer
Дата
Msg-id 20040504163619.GB10698@wolff.to
обсуждение исходный текст
Список pgsql-performance
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
>     )))
> );

В списке pgsql-performance по дате отправления:

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: Re: cache table
Следующее
От: Greg Stark
Дата:
Сообщение: Re: cache table