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

Re: Temporary Sequences SAP HANA

$
0
0

Hi Lars,

 

Thanks for your response. Actually it's because a weird behavior of SAP HANA Database and window functions.

 

If I use ROW_NUMBER() OVER() in a select statement and use the row_number in a order by, the ordination occurs just fine inside the DEBUG. But when I run the very same procedure from the hdb console or XS, the ordination doesn't behave the same way:

 

Result from DEBUG:

DEBUG.png

 

Result from Console:

 

console.png

 

Talking with some SAP COIL colleagues, they told me it's because SAP HANA optimize the execution and this optimization must be delaying the ROW_NUMBER calculation to the end of execution. So, to avoid that, I've used SEQUENCES instead of ROW_NUMBER.

 

The problem is, to avoid the sequence to cycle in the middle of the procedure execution, I need to set it to 0 every night.. If we had temporary sequences, I could avoid doing this job of resetting it every night..


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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