Re: [HACKERS] Subqueries and indexes

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] Subqueries and indexes
Дата
Msg-id 36EF54B8.D1B6F7C5@krs.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] Subqueries and indexes  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] Subqueries and indexes
Список pgsql-hackers
Bruce Momjian wrote:
> 
> > >
> > > Seems the optimizer could either hash the subquery, or us an index.
> > > Certainly would be faster than a sequental scan, no?
> >
> > Optimizer should hash the subquery, but I didn't implement this -:(
> > Try to rewrite query using NOT EXISTS and index will be used.
> 
> How hard would it be to implement it?  I know you are deep into MVCC,
> but doing a nested loop to join a subquery is really bad.

Not very hard, for un-correlated subqueries at least.
I have no time to do this for 6.5...

> 
...
> 
> All queries can't be rewritten as EXISTS.

All except of subqueries with aggregates in target list.

Vadim


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

Предыдущее
От: Vadim Mikheev
Дата:
Сообщение: Re: [HACKERS] Sequences....
Следующее
От: Zeugswetter Andreas IZ5
Дата:
Сообщение: Re: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of f rying pan, into fire)