Query Statement and Expression Hints
The following hints allow you to modify various types of query statements.
Override a SQL Query With a Custom Statement Using the Hyper-Q hint override_with_predefined_statement
, you can override a query with a custom query that will be executed on the cloud data warehouse when the SQL client submits a specific input query. You can use this to replace a query from the on-premise database with one that performs better on the cloud data warehouse.
Add Options to Transact-SQL Queries for Azure Synapse The add_synapse_query_options
hint lets you add options to Transact-SQL queries for Azure Synapse.
Add a Custom Query Label to the OPTIONS Clause You can add a custom query label to the Transact-SQL OPTION clause using the set_user_label
hint. A query label is a tag (or metadata) that you can apply to a query using the OPTION clause with the LABEL statement. This tag is helpful since the label is query-able and provides a mechanism for locating problem queries and can help to identify the progress of an ELT run.
Optimize Teradata DELETE Statements and Transaction Commands You can disable Teradata DELETE statements and transactions commands using the Hyper-Q hint disable_user_transactions
.
Check for Duplicate UPDATE Statements You can check for duplicate records in UPDATE statements using the update_duplicate_check
hint.
Materialize JOIN Predicates for Updates to Temporary Tables The passthru_upd_with_join
hint materializes JOIN predicates for updates into temporary tables by default to compensate for correlated subquery support. This improves query performance.