SQL Performance (MOSC)

MOSC Banner

MVW Refresh takes hours (and fails) but Select statement takes 15 minutes

edited May 27, 2020 11:17AM in SQL Performance (MOSC) 4 commentsAnswered

Hello

We have a materialized for that takes just 15 minutes to create but when it refreshes it takes hours and usually rollsback with snapshot too old.

As part of the refresh, indexes are dropped but when it comes to the refresh itself, the INSERT INTO SELECT statement is different to that of the SELECT statement in the CREATE MVW.

E.G. This is the create statement....

CREATE MATERIALIZED VIEW COSMOS_REPORTS.DIS_SHIPMENT_MED_NUMBERS_MVW (MEDICATION_NUMBER,LOT_NUMBER,SUBINVENTORY_CODE,PATIENT_NUMBER,VISIT_NUMBER,SERIAL_STATE,CONTAINER_NUMBER,DISTRIBUTION_ORDER_NO,USER_STATUS,SHIPPED_FLAG,INVENTORY_ITEM_ID,ORGANIZATION_ID,LINE_ID,HEADER_ID,TRIAL_SITE_ID,SHIP_TO_CONTACT_ID,CURRENT_ORGANIZATION_ID,STATE_CODE,TRANSACTION_ID)

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