Re: how sub queries and joins differs funcationally

Поиск
Список
Период
Сортировка
От Ludwig Lim
Тема Re: how sub queries and joins differs funcationally
Дата
Msg-id 20030127075236.66462.qmail@web80314.mail.yahoo.com
обсуждение исходный текст
Ответ на how sub queries and joins differs funcationally  ("shreedhar" <shreedhar@lucidindia.net>)
Список pgsql-admin
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-admin по дате отправления:

Предыдущее
От: "shreedhar"
Дата:
Сообщение: how sub queries and joins differs funcationally
Следующее
От: Michiel Lange
Дата:
Сообщение: Re: Cannot connect to the database (PG 7.3)