| From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
|---|---|
| To: | Timo Nentwig <timo(at)nitwit(dot)de> |
| Cc: | pgsql-performance(at)postgresql(dot)org, support(at)postgresql(dot)org |
| Subject: | Re: Bug in optimizer |
| Date: | 2004-05-04 16:36:19 |
| Message-ID: | 20040504163619.GB10698@wolff.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs pgsql-performance |
On Mon, May 03, 2004 at 18:08:23 +0200,
Timo Nentwig <timo(at)nitwit(dot)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
> )))
> );
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavel Stehule | 2004-05-05 09:43:49 | problem with instalation plpgsql on Mandrake |
| Previous Message | Sean Chittenden | 2004-05-04 07:06:51 | Re: [GENERAL] cache lookup of relation 165058647 failed |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Stark | 2004-05-04 18:14:15 | Re: cache table |
| Previous Message | Joseph Shraibman | 2004-05-04 15:27:53 | Re: cache table |