Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: TKPROF - Help needed interpreting results
Hi.
I have a couple of questions:
EXPLAIN shows that FULL table scan is performed each time. Check it.
3. TKPROF stats say that you executed SELECT 16K times.
Does it make sense?
Try to define an index on ( OBJECTIVE_NAME , CAMPAIGNID ) and removing LTRIM/RTRIM functions from OBJECTIVE_NAME and :b2 parm.
HTH. Michael.
In article <837r7c$3e75_at_eccws12.dearborn.ford.com>,
"Dipen Kotecha" <dkotecha_at_ford.com> wrote:
> We have a package that seems to take a long time to execute and I
carried
> out a trace on a session executing this package. Below is one of the
results
> I got from the TKPROF. I do not understand what could take it so long
and
> why there are no disk reads. If all the data is in the buffer why
does it
> take so long to fetch? Any help or pointers would be greatly
appreciated.
> The table concerned only has ~6000 rows.
>
> Regards,
>
> Dipen
>
> SELECT COUNT(*),MIN(CAR_TYPE_DEFINITION_NAME),MIN(SALEID),MIN
(DEALER_CODE),
>
> MIN(NA_TYPE),MIN(DECODE
(NA_TYPE,'F',FOREIGN_CAMPAIGNID,'O',OTHER_CAMPAIGNID,
> 'V', NULL ,'C',OTHER_CAMPAIGNID,'D',DOCUMENTID,'P',DOCUMENTID,'N',
> FOREIGN_CAMPAIGNID, NULL )),MIN(FOREIGN_OBJECTIVE_NAME),
> MIN(OBJECTIVE_DATE_TYPE),MIN(OBJECTIVE_DATE_FROM),MIN
(OBJECTIVE_DATE_TO)
> FROM
> MS2000.T_CAMPAIGN_OBJECTIVES WHERE CAMPAIGNID = :b1 AND
> LTRIM(RTRIM(OBJECTIVE_NAME)) = LTRIM(RTRIM(:b2)) AND
> (LTRIM(RTRIM(DEALER_CODE)) = 'DEALER' OR LTRIM(RTRIM(DEALER_CODE))
= :b3
> OR LTRIM(RTRIM(DEALER_CODE)) = 'DEALERTARGETS' )
>
> call count cpu elapsed disk query current
> rows
> ------- ------ -------- ---------- ---------- ---------- ----------
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Dec 15 1999 - 15:11:15 CST
![]() |
![]() |