Re: [HACKERS] Idea for speeding up uncorrelated subqueries - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Idea for speeding up uncorrelated subqueries
Date
Msg-id 199908060235.WAA21544@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Idea for speeding up uncorrelated subqueries  (Vadim Mikheev <vadim@krs.ru>)
List pgsql-hackers
> Bruce Momjian wrote:
> > 
> > Yes, the subqueries need work.  We don't even do index lookups into the
> > inner plan, only sequential.  Already on TODO.  The multiple query
>               ^^^^^^^^^^^^^^^
> What? Indices are used when appropriate.

Sorry, bad wording.  My English should be better.  :-)

I meant to say that joins from the outer plan to subplan are always
nested loops, not hash or mergejoins.  If you have something like:
delete from tab where col in (select col2 from largetable)

it takes a long time, when it really should be quick.  That is why
people are encouraged to use EXISTS.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] Idea for speeding up uncorrelated subqueries
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] Idea for speeding up uncorrelated subqueries