Re: [ADMIN] how sub queries and joins differs funcationally

Поиск
Список
Период
Сортировка
От Ludwig Lim
Тема Re: [ADMIN] how sub queries and joins differs funcationally
Дата
Msg-id 20030127073617.1057.qmail@web80301.mail.yahoo.com
обсуждение исходный текст
Список pgsql-sql
Hi shreedhar :

--- shreedhar <shreedhar@lucidindia.net> wrote:
> Can any body tell that how sub queries and joins
> differs funcationally.
> Because sub queries taking lot of time than joins.
>    The following could be the probable reasons: a) Your are using correlated queries - Correlated
queries always re-evaluate the sub-query for each row
processed.
b) You have an IN clause - try using EXISTS clause,
since it IN clause doesn't utilize the index when your
subquery is another SELECT statement. 

ludwig.

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL + SSL
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Rename database?