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: [EMAIL PROTECTED]
ThinX networked business services        Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to