SQL Performance (MOSC)

MOSC Banner

Two different plans in TEST & Prod

edited Sep 11, 2013 12:26AM in SQL Performance (MOSC) 12 commentsAnswered
hi,

 

we have a problem in production database where we find some sql statements running very slow.

but if you run same SQL statement in TEST it runs < 2 secs.

 

Production DB Prod.SchemaA  is exported into TEST DB as Test.SchemaA

 

When study the explain plan, we find Prod explain plan is different than test. if you create sql profile, by copying TEST explain plan, it would run faster in Production.

 

Now our question is why optimizer goes through two different plans when the schema structure same and data almost same in two databases?

 

Note that, we have two almost identical schema's in Production. Prod.SchemaA and Prod.SchemaB has same object names but some Prod.SchemaB may have small difference in indexes/constraints.

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