Database Tuning (MOSC)

MOSC Banner

Proper Materialized View Creation

edited May 12, 2009 4:19AM in Database Tuning (MOSC) 9 commentsAnswered ✓
  I have created a materialized view, but the explain plan is still selecting the master table:

What are the correct steps to change the execution plan?

 

I have used:

exec dbms_stats.set_table_stats('SALES', 'MV_TAB_01', numrows => 100, numblks => 10);

 

 

Execution Plan

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

Plan hash value: 2353103924

 

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

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

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

|   0 | SELECT STATEMENT              |                                | 26090 |  5248K|       |    18E  (1)|

|   1 |  HASH GROUP BY                |                                | 26090 |  5248K|    12M|    18E  (1)|

|*  2 |   TABLE ACCESS BY INDEX ROWID | SALES_BUSINESS_AREA            | 26090 |  5248K|       |    18E  (1)|

|   3 |    BITMAP CONVERSION TO ROWIDS|                                |       |       |       |         |

|*  4 |     BITMAP INDEX SINGLE VALUE | SALES_BUSINESS_IDX$$_1186A0001 |       |       |       |         |

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

 

Predicate Information (identified by operation id):

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

 

   2 - filter("A"."CUSTOMER_DESC" LIKE 'ORACLE%')

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