Subject very slow query with in clause
Author Olivier STEINBERG
Hi,

The following query takes more than 10 minutes to complete, where as run as
a stored proc
with a for select on PAIEMENT and then the update on ADHESION, it takes 0.5
ms.
Table PAIEMENT 300 K records, table ADHESION 30 K records.

I don't know how can I specify a plan instruction on this statment

UPDATE ADHESION
SET AO_CODE = 'I'
WHERE AO_CODE IN
(SELECT PA_ADHESION
FROM PAIEMENT
WHERE (PA_TYPE = 'P' or PA_TYPE = 'C')
AND PA_SITUATION = 'H')

If someone has any idea.

Thank's

Olivier STEINBERG