Quantcast
Channel: SCN : All Content - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 757

Performance of joins to inserted pseudo-table

$
0
0

We implementing temporal data and looking to use triggers to do the hard work.

 

We'd like to add a check to the trigger which involves a self-join of the pseudo-table "inserted".

 

ie

     if exists ( select 1

                    from   inserted before,

                             inserted after

                    where .....

 

however this is obviously very slow for large data (more than 5,000 rows) as there are no indexes on the inserted pseudo table.

 

We tried selecting the data into a temp table (but this isn't allowed in ASE - but is allowed in MS-SQL).

 

Is there some way of improving the performance of the inserted tables ?

Is there some way of relaxing the prevention of creation of temp tables from triggers

 

Any one done anything similar ?


Viewing all articles
Browse latest Browse all 757

Trending Articles



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