Skip to main content
The SHOW STATEMENT HINTS lists the that have been created for a specific SQL statement fingerprint using the information_schema.crdb_rewrite_inline_hints() built-in function.

Required privileges

Users must have the privilege to run SHOW STATEMENT HINTS.

Synopsis

show_statement_hints syntax diagram

Parameters

ParameterDescription
string\_or\_placeholderThe SQL statement fingerprint to show injected hints for. This can be a string literal (such as 'SELECT \* FROM users WHERE city = \_') or a SQL parameter placeholder (such as $1) for use in prepared statements.

Options

OptionValueDescription
DETAILSN/AInclude hint-specific information in JSON format.

Response

The following fields are returned:
ColumnTypeDescription
row\_idINTA unique ID.
fingerprintSTRINGThe SQL statement fingerprint that the hint applies to.
hint\_typeSTRINGHint type. rewrite\_inline\_hints indicates an injected hint.
created\_atTIMESTAMPTZThe timestamp when the injected hint was created.
detailsJSONBWhen the DETAILS option is specified, hint-specific information in JSON format. For rewrite\_inline\_hints, this includes the donor SQL fingerprint with hints that will be applied.

Examples

Show hints for a statement

To show all injected hints for a specific statement fingerprint:

Show hints with detailed information

To include the donor fingerprint in the output:

See also