Database Tuning (MOSC)

MOSC Banner

Different query plan

edited Dec 23, 2014 9:55AM in Database Tuning (MOSC) 3 commentsAnswered ✓

Hi, I'm getting high cost on select statement.Table is average 10 rows and serves as a log table that we insert row and then delete it.

select statement execution plan.

-------------------------------------------------------------------------------------------------------------------------------------

| Id  | Operation                     | Name                   | Rows    | Bytes | Cost (%CPU)| Time     |

-------------------------------------------------------------------------------------------------------------------------------------

|   0 | SELECT STATEMENT  |                             |     8      |  1264 |   277   (1)     | 00:00:04 |

|   1 |  TABLE ACCESS FULL| RESPONSE_LOG |     8      | 1264  |   277   (1)     | 00:00:04 |

-------------------------------------------------------------------------------------------------------------------------------------

Then i created new same table with "create table test_clob as select * from response_log" query. The select statement cost on new table is 3.

----------------------------------------------------------------------------------------------------------------------------------

| Id  | Operation                     | Name             | Rows  | Bytes | Cost (%CPU)| Time     |

-----------------------------------------------------------------------------------------------------------------------------

|   0 | SELECT STATEMENT  |                       |     6    |  2514 |     3   (0)        | 00:00:01 |

|   1 |  TABLE ACCESS FULL| TEST_CLOB1 |     6    |  2514 |     3   (0)         | 00:00:01 |

------------------------------------------------------------------------------------------------------------------------------

Why this 2 statements have different operation cost?

 

.

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