Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> How can i tune this sql query ?
Hi there,
Can u pls tell me how can i tune this query ?
at any time records in UnitIDTbl and INFOTBL is not more then 50000.
INSERT INTO UnitIDTbl
SELECT DISTINCT ID,INUMBER,'E-NOTFOUND'
FROM IMPORTTBL
WHERE LTRIM(RTRIM(ID)) || LTRIM(RTRIM(TO_CHAR(INUMBER)))
NOT IN
(SELECT DISTINCT LTRIM(RTRIM(ID)) || LTRIM(RTRIM(TO_CHAR(INUMBER)))
FROM INFOTBL )
AND (IMODE = 'N' OR IMODE = 'I' )
AND ATYPE != 'R'
Thanks,
Pankaj
Received on Wed Jan 18 2006 - 09:05:37 CST