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 -> count(*) to get timing on tuned SQL

count(*) to get timing on tuned SQL

From: rohit <rohitk1973_at_yahoo.com>
Date: 16 Jul 2003 11:27:31 -0700
Message-ID: <74353ecc.0307161027.59d8c62c@posting.google.com>


One of the things I try while tuning is to do a count(*) over the tuned SQL, this saves me the full result dump, and doesnt lose the query execution timing while doing IO. But I am not very sure if thats a right thing to do.
For example to get timing on a query like--

select /*+ USE_HASH(t2) */
from t1,t2
where t1.a = t2.a
and t2.b = 'xyz';

I would run a SQL like:

select count(*) from
(select /*+ USE_HASH(t2) */
from t1,t2
where t1.a = t2.a
and t2.b = 'xyz');

and I may try different combinations of hints that look good in explain plan outputs.

My assumption here is the nested query would have to run to completition and then a select count(*) would happen. So, if the select count(*) query took longer with Plan1 than Plan2, then nested query for Plan1 would run longer than the same for Plan2.

Question is, am I right in making this assumption.

Thanks,

Rohit Received on Wed Jul 16 2003 - 13:27:31 CDT

Original text of this message

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