Cost (%CPU) computation in the explain
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