Database Tuning (MOSC)

MOSC Banner

'Choosing the appropriate materialized view' - originally posted by USer53104 (but as a Document)

edited Aug 5, 2009 5:06AM in Database Tuning (MOSC) 4 commentsAnswered
We have 2 materealized views which are basically the same but partitioned differently.  Reports are either by posted date or transaction date.  We created the two seperate materialized views in hopes that Oracle whould choose the appropriate materialized view at query time dependent on if the query was by posted date or transaction date to take advantage of partition pruning.
In testing this I have found this not to be the case.  The query in question is based on posted date however Oracle is choosing to use the materialized view partitioned by transaction date.  When using the rewrite hint and hinting the materialized view on posted date the query has a much smaller cost, prunes as expected, and resolves much faster.

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