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: cpu time and query column in tkprof output

RE: cpu time and query column in tkprof output

From: Cary Millsap <cary.millsap_at_hotsos.com>
Date: Thu, 3 Feb 2005 07:01:32 -0600
Message-ID: <003c01c509f0$820fed10$6c01a8c0@CVMLAP02>


> Your first SQL can be faster but it is less scalable
> and can cause ELAPSED time to be worse if you have
> very busy system.

Absolutely true. To be really picky with the words, it can cause CPU = time to
be worse, too, if you have a busy system. It's because Oracle's = busy-wait
strategy for latch acquisition is very CPU intensive. The longer a = process
has to wait for a latch to become available, the more CPU it will burn = while
busy-waiting.

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

Upcoming events:

- Performance Diagnosis 101: 2/23 Houston, 3/16 Salt Lake City
- SQL Optimization 101: 2/7 Dallas
- Hotsos Symposium 2005: March 6-10 Dallas
- Visit www.hotsos.com for schedule details...


-----Original Message-----
From: oracle-l-bounce_at_freelists.org =
[mailto:oracle-l-bounce_at_freelists.org]
On Behalf Of Martic Zoran
Sent: Thursday, February 03, 2005 4:55 AM To: yasbs_at_kocbank.com.tr; cary.millsap_at_hotsos.com; = oracle-l_at_freelists.org
Subject: RE: cpu time and query column in tkprof output

Hi Yasin,

These are LATCH stats and not STAT stats.

Latch statistics are very important to predict which SQL will behave better when running in multiuser environment, with many processes doing the same or similar SQL's causing them to wait/lock/block on these latches.=20

Stats are showing more about what you needed to perform and partially on what you spend your pure CPU time.

Your first SQL can be faster but it is less scalable and can cause ELAPSED time to be worse if you have very busy system.

You should test it in real case scenario while having other things running (ideally the production :)

Regards,
Zoran

> Here are all the stats. Yes the execution plans are
> different. What i am
> trying to do is to re-write the sql for better
> performance. I re-write
> the sql ang get lower number of logical reads, but
> lose in other areas
> as i mentioned.

>=20

> So, by looking at the following stats and cpu time
> and elapsed time, i
> understand that i should stick with the original sql
> as the new sql
> performs worse.
>=20

> NAME =20
> RUN1 RUN2
> DIFF
> --------------------------------------------------
> ---------- ----------
> ----------
> LATCH.job_queue_processes parameter latch =20
> 1 0
> -1
> LATCH.ktm global data =20
> 0 1
> 1
> LATCH.ncodef allocation latch =20
> 1 0
> -1

        =09

__________________________________=20

Do you Yahoo!?=20
Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250
--
http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Feb 03 2005 - 08:04:59 CST

Original text of this message

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