SAP Note 1662726 - Optimizing select with FOR ALL ENTRIES in SAP HANA database

Component : BW HDB -

Solution : https://service.sap.com/sap/support/notes/1662726 (SAP Service marketplace login required)

Summary :
This SAP Note addresses performance issues in SELECT statements using the FOR ALL ENTRIES clause in SAP environments with SAP HANA. Optimization is achievable by adjusting query structure and applying specific DBSL and DBI hints to ensure efficient execution. Prerequisites include using a singular table or view in the statement, and exclusive use of EQ operators in the FOR ALL ENTRIES clause. The functional module RSDU_CREATE_HINT_FAE is recommended for setting these hints correctly. When these conditions are satisfied, significant performance improvements are observed, with revised SQL statements demonstrating optimized data retrieval practices.

Key words :
call function 'rsdu_create_hint_fae'  exporting    i_t_tablnm   = l_t_tablnm    i_fae_fields = 3    i_fae_lines  = l_lines    i_equi_join  = rs_c_true  importing    e_hint       = l_hint  exceptions, lt_source_tmpwhere col3 = lt_source_tmp-col3and  col4 = lt_source_tmp-col4and   col5 = lt_source_tmp-col5and   col2 = lt_source_tmp-col2, lt_source_tmpwhere col3 = lt_source_tmp-col3and  col4 = lt_source_tmp-col4and   col5 = lt_source_tmp-col5and   col2 = 'a', select col1 col2 col3 col4 col5from tab1into, select col1 col2 col3 col4 col5, col5 = lt_source_tmp-col5          %_hints adabas  l_hint, function module rsdu_create_hint_fae, col3 = lt_source_tmp-col3, col4 = lt_source_tmp-col4, col5 = lt_source_tmp-col5revision

Related Notes :

1622681DBSL hints for SAP HANA