Database Administration (MOSC)

MOSC Banner

v$sql behavior

edited Oct 5, 2018 5:48AM in Database Administration (MOSC) 5 commentsAnswered

Hi Guys,

I tried to perform the test below:

1. create table customers with a single column and lod with value 1 to 100000

2. perform select * from customers where customer_id=1;

3. it's performing a full scan here, with sql_id dg7wum42kp2ky and plan_hash_value 2008213504 showing in v$sql

4. create index on the column, gather stats and perform select * from customers where customer_id=1; again.

5. now when i query v$sql, now it shows same sql_id with different plan_hash_value 387610350 as it's now doing an index scan.

what i'm puzzled is.. i'm expecting to see 2 rows here with similar sql id dg7wum42kp2ky .

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