Home » SQL & PL/SQL » SQL & PL/SQL » optimisation of query
optimisation of query [message #2959] Mon, 26 August 2002 01:03 Go to next message
Raj
Messages: 411
Registered: November 1998
Senior Member
hi,
i want the following query to be optimised.

UPDATE tab A
SET A.PRODDESC =
(SELECT MAX(B.PRODDESC)
FROM tab B
WHERE
B.P_PRODCODE = A.P_PRODCODE)
WHERE A.PRODDESC IS NULL
and A.P_BRG_FLAG IS NULL AND A.P_LOC_FLAG IS NULL;

Thanks & Regards
Deepa
Re: optimisation of query [message #2963 is a reply to message #2959] Mon, 26 August 2002 08:51 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
The query is fine as is - make sure that you have an index on the P_PRODCODE column in table b.
Previous Topic: Problem of a Student with DBMS_JOB.
Next Topic: ASp-Oracle "Cursor not ready for I-O" error
Goto Forum:
  


Current Time: Thu Apr 25 17:44:54 CDT 2024