Skip to Main Content
  • Questions
  • A stored procedure taking 98% CPU time as a percentage of Elapsed Time

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, RUTHENDAR.

Asked: November 29, 2019 - 2:00 am UTC

Last updated: November 29, 2019 - 10:20 am UTC

Version: 12.1.0.2.0

Viewed 1000+ times

You Asked

A stored procedure taking 98% CPU time as a percentage of Elapsed Time. Please provide us the fix and recommendations to check

and Chris said...

Why exactly do you want to "fix" this?

Assuming you're talking about CPU time stats in AWR, this means:

Of the time spent executing the procedure, 98% of it was on CPU.

NOT you use 98% of the CPU available to the database.

A high % on CPU is generally a GOOD thing. It means you can scale your application by adding more CPU power!

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

plsql_code_type

lh, November 29, 2019 - 11:22 am UTC

Hi

Chris is quite right. These kinds of percent values can be very misleading.

However, You might want to check if cpu is used wisely
- is plsql_code_type native, which can make pl/sql execute with less cpu cycles.
- is Your algorithm and datastructures correct. Same things can be achieved with less work or with great effort.

You should find out how much time one execution takes and it is acceptable.

lh

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database