Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can i tune this sql query ?
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/dischnerReceived on Wed Jan 18 2006 - 09:15:52 CST
![]() |
![]() |