Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Alternative to Dynamic SQL in Trigger

$
0
0

Hmm... this sounds like a materialized view with incremental refresh.

This is quite an effort to fix a unfortunate tooling decision.

 

In my experience manual PIVOT/UNPIVOT has always turned out to be not very fast.

 

Anyhow, an approach that you might consider is:

  • Use the triggers just to maintain a table of changed records.
  • Create a procedure that checks for entries in this table and issues the update of your materialized view.

 

Don't do actual work in the trigger.

 

As you don't need to be dynamic, you can look into parallelizing the data streams for the PIVOT action in your view-refresh-procedure.

 

- Lars


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>