Re: [HACKERS] Idea for speeding up uncorrelated subqueries

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Idea for speeding up uncorrelated subqueries
Дата
Msg-id 199908051617.MAA29512@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Idea for speeding up uncorrelated subqueries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> >> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> >>>> Yes, the subqueries need work.  We don't even do index lookups into the
> >>>> inner plan, only sequential.  Already on TODO.
> >> 
> >> Huh?  I don't follow that at all...
> 
> > Suppose you have a subquery that returns 1000 rows.  There is no code so
> > lookups of the inner table are indexed:
> 
> >     select *
> >     from tab
> >     where col in (select col2 from tab2)
> 
> > In this case, a sequential scan of the subquery results are required.
> 
> Well, yes, the subquery is a sequential scan.  I guess what you are
> envisioning is rewriting this into some kind of nested-loop join?
> For simple cases that might be possible...

Yes, or mergejoin/hashjoin.

--  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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Idea for speeding up uncorrelated subqueries
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: PG 6.5.1 RPMS