Increasing the SAP-NLS Performance
|SAP Corrections||SAP IQ DB Settings||SAP HANA DB Settings|
|optimize NLS for SDA||improve NLS load||optimizing F4 access||optimizing Query access|
With the Introduction of smart data access (SDA) especially between SAP HANA and IQ, the data provisioning process can be optimized. Never the less, some additional Parameters have to be introduced on the ABAP and HANA Backend as well.
The Implementation of the SDA between SAP HANA and IQ is already discussed in the –
SAP First Guidance – SAP-NLS Solution with SAP IQ This would be a mandatory task first.
for General Information about the SAP-NLS Solution please visit – SAP-NLS Solution for SAP BW
Recommended SAP Corrections (SAP BW 7.40/7.50)
You can use the SAP Launchpad – https://launchpad.support.sap.com/#/mynotes?tab=Search
to select the necessary SAP Notes for your SAP System and SP Level:
|SP Level 7.40:||SAPKW74017||(Stack +1 => corrections after 7.40 SP16)|
|SP Level 7.50:||SAPK-75011INSAPBW||(Stack +1 => corrections after 7.50 SP10)|
|SP Level BW/4||SAPK-10008INDW4CORE||(Stack +1 => corrections after BW/4 SP07)|
Check the Attachment for the specific Releases in the following SAP Notes:
General Performance Optimizations in SAP NLS (BW ABAP)
As a general reference please consider the following knowledge base article on SAP NLS IQ performance:
Performance in writing Archives – see also NLS load parallelization
Settings for SAP IQ for SAP-NLS
Check the SAP IQ database settings (based on SAP IQ 16.0 SP10)
- SQL Anywhere Server 17.0 – DB start options
- IQ PAGE SIZE Parameter Guidelines
- Catalog Page Size Option
- IQ Performance Options – on DB start
- additional settings for the SQL anywhere interface:
- -gss: This parameter sets the catalog (Sql Anywhere) stack size for catalog threads. For all 64-bit UNIX platforms: Default=Min = 1 MB. Max = 8MB. Considering some large or complex queries ,please set this value to 8MB
- -iqtss: Specifies the stack size, in KB, for server execution threads running either in the background or as part of a thread team assisting the main server connection thread. The default value is 512KB on 64-bit platforms. However, some very complex queries may return an error indicating that the depth of the stack exceeded this limit, so you may need increase this value to 2048.
- SAP IQ calculates the stack size of server threads using the formula: ( -gss + -iqtss)
- -iqmc: Specifies main buffer cache size in MB, you may set this value to 8192.
Finally, please consider the following SAP Note for introducing a new dbspace-oriented partitioning mode for SAP NLS IQ for optimized partition creation during archiving from BW
Settings for SAP HANA together with NLS
Currently the following parameters should be changed on the SAP HANA server (included in SP09):
In Addition you can also set the remote connection timeout as follows in the HANA Studio with the SQL interface: ALTER SYSTEM ALTER CONFIGURATION (‘indexserver.ini’, ‘system’) set (‘smart_data_access’, ‘remote_conn_idle_timeout’) = ‘180’ with reconfigure;
With HANA 1.0 SP10 (Rev. 10x.x) you should also set the DML Mode to “readonly”
Currently the following parameters should be changed on the SAP ABAP server:
- rsdb/supports_fda_prot = 0
- rsdb/max_blocking_factor = 50
- rsdb/max_in_blocking_factor = 100 (as of SAP Kernel 7.49, previously 1024)
- rsdb/prefer_join = 0
- rsdb/prefer_union_all = 0
- rsdb/prefer_in_itab_opt = 1
- rsdb/prefer_join_with_fda = 1 (as of SAP Kernel 7.43)
Optimize the SAP-NLS Solution for SDA with SAP HANA
Note 2130587 – SYB IQ: performance enhancement for LOAD statement (latest ASE/IQ LibDBSL)
Note 2352696 – SAP HANA smart data access 2.0 (latest ODBC drivers for SAP HANA)
Note 2445973 – SAP_IQNC 16.1 SP01 (Build 10531) Release Notes Information (latest ODBC drivers for SAP IQ)
With the Introduction of SAP HANA Smart Data Access (SDA), the data access to archived data can be generally optimized. For general information on how BW on HANA use HANA Smart Data Access please see the following Blog – SAP BW on HANA smart data access
Please note that especially selections on navigational attributes are considered with the automatic usage of semi-joins or joint relocation’s for the execution of queries based on SDA together with HANA and IQ.
For more details see – SAP BW on HANA & HANA Smart Data Access – BEx Query Execution and
Note 2156717 – NLS: queries with navigation attributes/hierarchy node restrictions are slow
In addition, the following specific SAP Notes for Nearline Storage and Smart Data Access apply:
Note 2100962 – FAQ: BW Near-Line Storage with HANA Smart Data Access: Query Performance
Note 2165650 – FAQ: BW-Nearline-Storage mit SAP HANA Smart Data Access
Note 2214892 – BW HANA SDA: Process Type for creating Statistics for Virtual Tables
Note 2202052 – BW Near-Line Storage with HANA Smart Data Access: Poor Query Performance with InfoCubes
Note 2283055 – External SAP HANA view: object specific enforce SQL engine execution
The Report RSDDB_INDEX_CREATE_MASS
Note 2194638 – Report RSDDB_INDEX_CREATE_MASS: regenerate indices if invalid, independent of ‘skip_if_exists’ flag
Note 2379817 – DataStore Objects (advanced) with Near-Line Storage: Error during Extraction
Note 2198386 – BW HANA SDA: Performance Improvement for Creation of Database Statistics for Virtual Tables of Open ODS Views or NLS-Archives
Note 2288710 – BW HANA SDA: Create Database Statistics for Virtual Tables of Open ODS Views
Note 2431673 – RSSDA_CREATE_TABLE_STAT shows error: statistics cannot be found
The Report RSSDA_CREATE_TABLE_STAT
can be used to create database statistics for HANA Virtual Tables.
HANA Virtual Tables are used in the context of HANA Smart Data Access. The execution time can be quite time consuming. As of HANA SP10, a new statistics type RECORD COUNT is available for virtual tables via a system view named SYS.DATA_STATISTICS.
This View offers for Example CREATE_TIME und LAST_REFRESH_TIME as columns.
for details of the usage, see the SAP HANA Admin Guide for SP12
- HANA SYS.DATA_STATISTICS system view provides db staticstis for virtual tables.
- HANA SYS.M_JOIN_DATA_STATISTICS system view provides engine join db statistics.
- Check the help pages for the CDS Views for Data Warehouse Monitoring
Nearline storage (NLS) load parallelization
Note 2128579 – Data Load into SAP IQ during Copy Phase utilizes only one server-side Thread
Note 2364354 – SIQ: Support for aDSO and load striping
Note 2399003 – SIQ: Load fails with error: DBSQL_DUPLICATE_KEY_ERROR
Note 2420571 – SIQ: enhance performance of bulk updates and deletes
Modify connection into IQ by adding SIQ_BULK_OP=1 to the connection information.
With these SAP Notes two additional parameters were introduced to significantly increase the LOAD statement for writing data into SAP-NLS.
Parameter LOAD_STRIPE_SIZE setting this parameter to a value n > 1 parallelizes the load.
Parameter LOAD_STRIPE_WITH is the parallel degree multiplied with SYBASE_IQ_BUFFER_SIZE
Parameter SYBASE_IQ_LOAD_DIR could be changed at the database connection level (DBCO) and is by default the data directory of the SAP Instance. If you plan to load a large amount of data, please make sure that you have enough space left, or specify another directory/device.
Optimizing F4 Help access for SAP-NLS
It is suitable to change the settings for the affected Dimension tables to a more optimized setting. This can be done via the “Provider-Specific” settings for the Dimensions within the InfoCube. By default these options are empty, which means the default settings of the individual InfoObjects for query definition and execution are take place.
Furthermore any reorganization of the dimension tables e.g. via transaction RSRV should be avoided, due to no benefit at all for the application rather to corrupt the F4 access to the SAP-NLS solution and this will result in wrong F4 values and much less performance.
As an example see the following screens for an optimized setting. For further information, please consult the help.sap.com pages.
Optimizing Query access for SAP-NLS
Note 2001947 – Switch for operations in SAP HANA
Note 2099102 – SFAE implementation of LOOKUP has poor performance
Note 2129546 – Extended pruning on time characteristics for Near-line data
Note 2156717 – NLS: queries with navigation attributes/hierarchy node restrictions are slow
Queries on InfoCubes show poor performance since filter conditions are pushed as “SID-based” filters to the HANA database instead of using the “key-values” for filtering. With “SID-based” filters, the SID-table needs to be joined to the Virtual Table in order to execute the filter. This join adds complexity to the SQL-Statement which makes it more difficult to optimize the query in a federated database environment.
This note adds a checkbox to the “Near-line Storage” tab of the Data Archiving Process (DAP) maintenance to switch query optimization on (this is the default) or off. You must activate the DAP in order to make your setting effective. If optimization is switched on, but query optimization is not configured or not available for the Near-line Connection query access will use the non-optimized implementation via the Virtual Provider interface utilizing the Near-line Provider implementation via the standard Near-line Interface. In case Smart Data Access is configured for the Near-line Connection also the name of the HANA Virtual Table is shown.
Roland Kramer, PM EDW (BW/HANA/IQ), SAP SE