Subject RE: [ib-support] very slow query with in clause
Author Mauricio Italo Magni
Try with:

Update adhesion
Set AO_CODE='I'
Where Exists
(select 1 from Paiement
where Pa_Adhesion = Ao_Code
and Pa_Situation = 'H'
and (Pa_Type='P' or Pa_Type='C')

Mauricio.
-----Mensaje original-----
De: news@... [mailto:news@...] En nombre de
Olivier STEINBERG
Enviado el: domingo 23 de junio de 2002 18:33
Para: ib-support@yahoogroups.com
Asunto: [ib-support] very slow query with in clause

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




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/