Ansicht
Dokumentation

ABENOSQL_DB_HINTS - OSQL DB HINTS

ABENOSQL_DB_HINTS - OSQL DB HINTS

General Material Data   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

- Database Hints

... %_HINTS db @dbhint1
           $[db @dbhint2
            ... $]  ...


Effect

The addition %_HINTS can be used to specify database hints at the following positions in statements:

  • After the WHERE condition of the statements UPDATE and DELETE.

One or more database hints can be specified after %_HINTS as a blank-separated list in flat, character-like literals or host variables dbhint1, dbhint2, and so on. 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.

Any database hints specified are ignored if table buffering is used.

Notes

  • A database hint usually only affects the part of an statement for which is it specified. It does not usually affect the way a statement works, but may affect performance.
  • Database hints should only be used with extreme caution. For example, they can be used as a last resort to influence the optimizer of the database system when selecting a secondary index.
  • If database hints are used, they should generally be checked every time the database release or system configuration is changed.
  • Database hints specified as literals are also not evaluated until runtime. If the syntax is incorrect, they can cause exceptions at runtime or are ignored. In the strict mode as of Release only, statically known database hints are also checked statically.
  • Database hints of the database interface are intended for internal use only. These are put between & characters and are evaluated before they are transferred to the database system from the database interface.
  • In the strict modes of the syntax check from Release 7.40, SP05, the escape character @ must be before a hint that is not specified as a literal.

Example

Specifies a HANA-specific database hint for the SAP HANA database.






rdisp/max_wprun_time - Maximum work process run time   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 5326 Date: 20240426 Time: 111726     sap01-206 ( 71 ms )