Re: Accelerating subqueries

Поиск
Список
Период
Сортировка
Искать
От
Herbert Liechti
Тема
Re: Accelerating subqueries
Дата
Msg-id
38EC992B.1FF38C9@thinx.ch
Список
Дерево обсуждения
Re: Accelerating subqueries Ed Loehr <eloehr@austin.rr.com>
Fabrice Scemama wrote:
> 
> Hi fellow PostgreSQL users.
> 
> Here's a query:
> 
> DELETE FROM Annonces WHERE Id_Ag IN
> (
>     SELECT Id FROM Installs
>     WHERE Si_Compte_Actif = 'f'
> );

The IN Clause is known to be very very slow. Use the
EXISTS Clause instead. 

Regards Herbie
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Herbert Liechti                     E-Mail: Herbert.Liechti@thinx.ch
ThinX networked business services        Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
В списке pgsql-general по дате отправления
От: Fabrice Scemama
Дата:
Сообщение: Accelerating subqueries
От: Ed Loehr
Дата:
Сообщение: Re: Accelerating subqueries
FAQ