Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: tkprof questions
Vik wrote:
>
> 1. If I run:
>
> TKPROF x.trc ora x.txt SORT = exeela PRINT = 10
Why the "ora " ?
> shouldnt that give me the 10 most expensive queries in terms
> of time to execute?
Yes, I should think so.
> 2. How do I get tkprof to aggregate queries that are repeated with
> a different parameter? like:
> select id from foo where name = a
> select id from foo where name = b
Best guess from someone will limited experience with tkprof:
The problem is that you're not using bind variables! Using bind
variables will also make your queries faster because then oracle
will already have parsed the query, and the "parametrisized" query
will turn up only once i tkprof: Typically, use:
select avg(age) from emp where dept=:1;
(One query in tkprof)
Then bind 'SALES' and 'STORE' to :1 insted of using:
select avg(age) from emp where dept='SALES';
select avg(age) from emp where dept='STORE';
(...witch will become two queries in tkprof).
-- Kjetil Skotheim kjetilskotheim_at_iname.comReceived on Fri Aug 25 2000 - 15:18:03 CDT