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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Script Question from Cary's Book

RE: Script Question from Cary's Book

From: Cary Millsap <cary.millsap_at_hotsos.com>
Date: Tue, 20 Jul 2004 19:59:03 -0500
Message-ID: <003f01c46ebd$eb4ea290$e6ea8640@CVMLAP02>


Mohammed,

You're right. I can't believe I divided by a constant in the book, = because
the divisor varies by Oracle version. I normally use something like = this:

my $ora_version =3D 8; # use 7, 8, 9, or 10 my %ora_resolution =3D (

         7 =3D> 0.01, # Oracle version 7 publishes centiseconds

         8 =3D> 0.01, # Oracle version 8 publishes centiseconds

	 9 =3D> 0.000001,		# Oracle version  9 publishes microseconds
	10 =3D> 0.000001,		# Oracle version 10 publishes microseconds
);
my $res =3D $ora_resolution{$ora_version};

...Then I multiply by $res instead of dividing by a constant.

You may also want to modify the precision on the %*.*f specifications, = since
there's more information available to you to the right of the decimal = point
in version 9+.

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com
* Nullius in verba *

Upcoming events:
- Performance Diagnosis 101: 7/20 Cleveland, 8/10 Boston, 9/14 San =
Francisco
- SQL Optimization 101: 7/26 Washington DC, 8/16 Minneapolis, 9/20 =
Hartford
- Hotsos Symposium 2005: March 6-10 Dallas

-----Original Message-----
From: oracle-l-bounce_at_freelists.org =
[mailto:oracle-l-bounce_at_freelists.org]
On Behalf Of mkb
Sent: Tuesday, July 20, 2004 4:19 PM
To: oracle-l_at_freelists.org
Subject: Script Question from Cary's Book

Folks,

Question about the script in Cary's book (Optimizing Oracle Performance). I don't know if I can cut 'n paste the script without infringing on copyright, so forgive me if I just paste the relevant couple lines.=20

The actual script is on page 96, chapter 5: Interpreting Extended SQL Trace Data so I guess only those folks who have the book could answer, right?

I ran the script against an Oracle 9i R2 trace file running on Windows 2000. My assumption is that all timings are in micro seconds (1/1000000 sec). If that is the case, should the following lines at the bottom of the script:

printf "%8.2fs %5.1f%%, %-40s\n", $ela{$_}/100, $ela{$_}/$r*100, $_ for sort { $ela{$b}
<=3D> $ela{$a} } keys %ela;
printf "%8s- %5s- %-40s\n", "-"x8, "-"x5, "-"x40; printf "%8.2fs %5.1f%% %-40s\n", $r/100, 100, "Total response time";

be written as:

printf "%8.2fs %5.1f%%, %-40s\n", $ela{$_}/1000000, $ela{$_}/$r*100, $_ for sort { $ela{$b}
<=3D> $ela{$a} } keys %ela;
printf "%8s- %5s- %-40s\n", "-"x8, "-"x5, "-"x40; printf "%8.2fs %5.1f%% %-40s\n", $r/1000000, 100, "Total response time";

i.e. $ela{$_}/100 becomes $ela{$_}/1000000 and $r/100 becomes $r/1000000.

Reason is I'm getting some really way off numbers like 10s' of hours for a single row update. Don't have access to the real live database, just the trace files.

So, any ideas before I make any silly conclusions?

Thanks

mohammed

=09

        =09



Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Tue Jul 20 2004 - 19:57:26 CDT

Original text of this message

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