SAP NetWeaver AS ABAP Release 752, ©Copyright 2017 SAP AG. All rights reserved.
ABAP - Keyword Documentation → ABAP - Reference → Processing External Data → ABAP Database Accesses → Open SQL →Open SQL - Database Hints
Syntax
... %_HINTS db @dbhint1
[db @dbhint2
... ] ...
Effect
The addition %_HINTS can be used to specify database hints at the following positions in Open SQL statements:
One or more database hints can be specified after %_HINTS as a blank-separated list in flat, character-like data objects dbhint1, dbhint2, ... . The name of host variables should be prefixed with the escape character @. The addition db must be used before each database hint to specify the database system for which the hint is intended. The following table shows the possible additions and the corresponding database system:
Addition | Database System |
ADABAS | SAP MaxDB |
AS400 | IBM System i (AS/400) |
DB2 | IBM DB2 |
DB6 | IBM DB2 UDB |
HDB | SAP HANA database |
MSSQLNT | Microsoft SQL Server |
ORACLE | Oracle DB |
SYBASE | Sybase ASE |
A database system can be specified more than once if there are several database hints for this system. The possible database hints are database-specific and may depend on the release of the database system. They can be found in the documentation of the respective database system. An empty hint is ignored.
If table buffering is used, or if pool or cluster tables are accessed, any database hints specified are ignored.
Notes
Example
Specifies a HANA-specific database hint for the SAP HANA database.
SELECT *
FROM scarr
WHERE carrid = 'LH'
%_HINTS HDB 'INDEX_SEARCH'
INTO TABLE @DATA(result).