Re: Damn slow query

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Damn slow query
Дата
Msg-id 200210092233.g99MXeH07489@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Damn slow query  ("Magnus Naeslund(f)" <mag@fbab.net>)
Список pgsql-hackers
Magnus Naeslund(f) wrote:
> Joe Conway <mail@joeconway.com> wrote:
> > "IN (subselect)" is notoriously slow (in fact it is an FAQ). Can you
> > rewrite this as:
> >
> 
> ...
> 
> Stephan Szabo <sszabo@megazone23.bigpanda.com> wrote:
> > Per FAQ suggestion, try something like
> 
> ...
> 
> Thanks alot, below are the results on your suggestions, quite an
> dramatic differance (but this is another box, faster, and running 7.3b2
> so the 45 minutes doesn't hold here, but it took more than 10 minutes
> before i stopped the original query).
> 
> Is this an todo item, or should every user figure this out (yeah i know
> i should have read the FAQ when it went so totally bad).
> The NOT IN it seems quite natural here, but then again, i don't think as
> the db as you do :)

We already have a TODO item:
* Allow Subplans to use efficient joins(hash, merge) with upper variable

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


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

Предыдущее
От: "Magnus Naeslund(f)"
Дата:
Сообщение: Re: Damn slow query
Следующее
От: "Magnus Naeslund(f)"
Дата:
Сообщение: Re: Damn slow query