SQL Language (MOSC)

MOSC Banner

Deriving summary information

edited Jan 10, 2012 9:56PM in SQL Language (MOSC) 4 comments
I have a table in the following form:

ID      REF_NO      REMARKS1       REMARKS2

1        A001          text1                  text2

2        A001          text1                  text2

3        A002          text1                  text2 

4        A003          text1                  text2 

5        A003          text1                  text2 

I would like to store the max(ID) for each REF_NO instead of deriving it, for performance reasons. I have considered the following options but could not use them for the reasons specified below:

- materialized views: data is highly volatile thus I would require a FAST refresh as I need real-time data at all times, but in this case it's not possible due to the aggregation MAX function

- triggers: unable to use row-level triggers to satisfy the query which requires a table lookup (ORA-04091 mutating trigger exception)

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