Database Administration (MOSC)

MOSC Banner

Query execution plan issue?

edited Sep 11, 2018 5:00AM in Database Administration (MOSC) 28 commentsAnswered

HI DBA Gurus,

I have a query which when running in production is faster, but slow in UAT.

I checked the execution plan for production, there the plan is resulting in row count of 28807 only but cost of 1339K, whereas in UAT it's going for a plan that is accessing  283K rows with a cost of 1111k.

As seen, the production execution plan uses an index created for 3 columns in a large table, whereas the plan in UAT uses another index created on the same table but on only one of the rows.

I am guessing the rows accessed in higher in UAT because of this. Have pasted the explain plan output for UAT below. Can anyone help? How can I make sure the query uses the other index?:

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