Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How can i tune this sql query ?

Re: How can i tune this sql query ?

From: A. Dischner <anton.dischner_at_med.uni-muenchen.de>
Date: Wed, 18 Jan 2006 16:15:52 +0100
Message-ID: <anton.dischner-98F41A.16155118012006@wsc10.lrz-muenchen.de>


Hi,

in Oracle < 10:

did you try to use optimizer hints like:

/* rule */
/* first_rows */

in Oracle >= 10 you can try it with Enterprise manager's

Performance/Top-Sql/Run SQL-Tuning Advisor

regards,

Toni

PS: Top tuning hint is to use proper indexes.

In article <1137596737.588194.198010_at_z14g2000cwz.googlegroups.com>,  "Pankaj" <pg_gupta78_at_rediffmail.com> wrote:

> 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

-- 
Posen fuer Anfaenger: http://www.w-klch.med.uni-muenchen.de/dischner
Received on Wed Jan 18 2006 - 09:15:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US