Re: [HACKERS] Idea for speeding up uncorrelated subqueries

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Vadim Mikheev <vadim(at)krs(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Idea for speeding up uncorrelated subqueries
Date: 1999-08-06 02:35:32
Message-ID: 199908060235.WAA21544@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1999-08-06 03:04:38 Re: [HACKERS] Idea for speeding up uncorrelated subqueries
Previous Message Vadim Mikheev 1999-08-06 02:12:10 Re: [HACKERS] Idea for speeding up uncorrelated subqueries