This blog can be use to optimize Performance of SELECT….FOR ALL ENTRIES statements which are taking more time to execute.(Implementation of Note 1662726)
Pre-requisite: SAP DB should be HANA DB.
With the use of this optimization techniques we can improve execution time of time consuming and expensive SELECT….FOR ALL ENTRIES statements.
Code Changes Needs to be implemented simply in 2 steps:
Step 1) Call FM RSDU_CREATE_HINT_FAE
Step 2) We can use HANA DB HINTS from above FM while calling SELECT… FOR ALL ENTRIES statement.
So DB HINTS imported from FM RSDU_CREATE_HINT_FAE should be used in SELECT… FOR ALL ENTRIES Statement.
Please find below run-time comparison between “Normal For All Entries statement” and “HANA Optimized For All Entries” :
SELECT… FOR ALL ENTRIES Statement :
HANA Optimized SELECT… FOR ALL ENTRIES Statement :
Run Time Comparison :
So , with ‘Normal For All Entries statement’ , we need 21.62 seconds
and with the use of ‘HANA Optimized For All Entries statement’, we need 1.97 seconds.
So, with the current scenario/example comparison, we able to improve more than 90 percent of execution time.
So, with this optimization technique we can able to improve significant run time.
Thanks for your time 🙂
PS: I have used this in one of my END Routine code in SAP BI transformation.