on 01-21-2016 6:58 PM
HI Expert,
I've a HANA table which contains approx. 1 million records. I would like to loop through set of records, perform calculation using PAL function, store the results into table and then proceed with next set of records. Is the DECLARE CURSOR and FOR DO..END FOR only option to Loop through.
Is there any other efficient way of looping through huge data set?
Thanks,
Milind
Hi Milind,
Is the DECLARE CURSOR and FOR DO..END FOR only option to Loop through.
You can also use WHILE for looping.
Is there any other efficient way of looping through huge data set?
Generally all of the loop constructs, especially cursors, cause performance issues as SQL engine cannot utilize optimizing the parallelization.
SQLScript reference guide helps you in understanding better, especially page no. 142
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.