DIRECTED_QUERIES

Returns information about directed queries.

Returns information about directed queries.

Column Name Data Type Description
QUERY_NAME VARCHAR

Directed query's unique identifier, used by statements such as ACTIVATE DIRECTED QUERY. How this identifier is set depends on how it was created:

  • Direct call to CREATE DIRECTED QUERY: Set by the user-supplied query-name argument.

  • Call to SAVE_PLANS: Concatenated from the following strings:

    save_plans_query-label_query-number_save-plans-version
    

where:

  • query-label is a LABEL hint embedded in the input query associated with this directed query. If theinput query contains no label, then this string is set to nolabel.
  • query-number is an integer in a continuous sequence between 0 and budget-query, which uniquely identifies this directed query from others in the same SAVE_PLANS-generated set.
  • [save-plans-version](/en/sql-reference/system-tables/v-catalog-schema/directed-queries/#SAVE_PLANS_VERSION) identifies the set of directed queries to which this directed query belongs.
IS_ACTIVE BOOLEAN Whether the directed query is active
VERTICA_VERSION VARCHAR Vertica version installed when this directed query was created.
COMMENT VARCHAR User-supplied or optimizer-generated comment on a directed query, up to 128 characters.
SAVE_PLANS_VERSION INTEGER

One of the following:

  • 0: Generated by a direct call to CREATE DIRECTED QUERY.
  • >0: Identifies a set of directed queries that were generated by the same call to SAVE_PLANS. All directed queries of the set share the same SAVE_PLANS_VERSION integer, which increments by 1 the previous highest SAVE_PLANS_VERSION setting. Use this identifier to activate, deactivate, and drop a set of directed queries.
USERNAME VARCHAR User that created this directed query.
CREATION_DATE VARCHAR When the directed query was created.
SINCE_DATE VARCHAR Populated by SAVE_PLANS-generated directed queries, the earliest timestamp of input queries eligible to be saved as directed queries.
INPUT_QUERY VARCHAR Input query associated with this directed query. Multiple directed queries can map to the same input query.
ANNOTATED_QUERY VARCHAR Query with embedded hints that was paired with the input query of this directed query, where the hints encapsulated the query plan saved with CREATE DIRECTED QUERY.
DIGEST INTEGER Hash of saved query plan data, used by the optimizer to map identical input queries to the same active directed query.

Privileges

Superuser

Truncated query results

Query results for the fields INPUT_QUERY and ANNOTATED_QUERY are truncated after ~32K characters. You can get the full content of both fields in two ways: