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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~