Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
212 views

How To Check The Existing Hint For A SQL Statement Hash

Uploaded by

BBK
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
212 views

How To Check The Existing Hint For A SQL Statement Hash

Uploaded by

BBK
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SAP Knowledge Base Article

3424050 - How to check the existing hint for a sql statement hash
Component: HAN-DB-PERF (SAP HANA > SAP HANA Database > SAP HANA Database Performance), Version:
1, Released On: 23.01.2024

Symptom
You want to check whether there is hint existing for a specific statement hash which might impact the execution plan.
Or you want to check whether the hint has been successfully applied to the specific statement hash.

Environment
SAP HANA Database 1.0
SAP HANA Database 2.0

Resolution
You can use the following methods to check the existing hints for the statement hash:
1. Run the command below:
SELECT * from STATEMENT_HINTS where STATEMENT_HASH = '<replace_with_statement_hash>';
STATEMENT_HINTS System View
2. Run the script SQL: "HANA_SQL_PlanStability_StatementHints", you can find the script in note 1969700.
You can navigate to * Modification section * part and modify the variable "STATEMENT_HASH" with the one that you
want to check.
Then you can copy all the content of the script and paste it to SQL Console to execute.
( SELECT /* Modification section */
'SERVER' TIMEZONE, /* SERVER, UTC */
'%' STATEMENT_HASH,
'%' STATEMENT_STRING,
'%' HINT_STRING,
'%' IS_ENABLED,
'%' USER_NAME,
' ' EXCLUDE_PREDEFINED_ENTRIES,
' ' EXCLUDE_DELIVERED_ENTRIES,
' ' ONLY_ENTRIES_OLDER_THAN_LAST_UPGRADE,
80 LINE_LENGTH,
-1 STATEMENT_STRING_LENGTH

See Also
1969700 - SQL Statement Collection for SAP HANA
STATEMENT_HINTS System View

Keywords
HINT; STATEMENT_HINTS; STATEMENT_HASH; HANA_SQL_PlanStability_StatementHints;
Attributes
Key Value

Requires Action 0

Products
Products

SAP HANA, enterprise edition 1.0

SAP HANA, platform edition 2.0

You might also like