SQL Performance (MOSC)

MOSC Banner

Cost (%CPU) computation in the explain

edited Dec 5, 2013 2:06AM in SQL Performance (MOSC) 1 commentAnswered
Hi

   How the cost and %CPU calculated in the explain plan.  In the below example the query is returning 1 row but the %CPU is showing 100%. 

   Request to explain the basis of %CPU computation

 ------------------------------------------------------------------------------------------------
| Id  | Operation                   | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT            |                  |       |       |     2 (100)|          |
|*  1 |  TABLE ACCESS BY INDEX ROWID| XXXX             |     1 |   303 |     2   (0) | 00:00:01 |
|*  2 |   INDEX UNIQUE SCAN         | XXXX_idx         |     1 |       |     1   (0) |  00:00:01|
------------------------------------------------------------------------------------------------

Regards

Bhanu Pratap M

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center