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



Connor and Chris don't just spend all day on AskTOM. You can also catch regular content via Connor's blog and Chris's blog. Or if video is more your thing, check out Connor's latest video and Chris's latest video from their Youtube channels. And of course, keep up to date with AskTOM via the official twitter account.

Question and Answer

Chris Saxon

Thanks for the question, RUTHENDAR.

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

Answered by: Chris Saxon - Last updated: November 29, 2019 - 10:20 am UTC

Category: PL/SQL - Version:

Viewed 100+ times

Whilst you are here, check out some content from the AskTom team: Just one more week

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 we 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!

and you rated our response

  (1 rating)



November 29, 2019 - 11:22 am UTC

Reviewer: lh


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.


More to Explore


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