Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server 2022 (16.x)
Azure SQL Database
Azure SQL Managed Instance
Removes all Query Store hints for a given query ID.
Transact-SQL syntax conventions
sp_query_store_clear_hints
[ @query_id = ] query_id
[ ; ]
The Query Store query_id
column from sys.query_store_query. query_id is bigint.
0
(success) or 1
(failure).
Query Store hints are created by sys.sp_query_store_set_hints.
Requires the ALTER permission on the database.
The following example removes the Query Store hint text for query_id 39:
EXEC sys.sp_query_store_clear_hints @query_id = 39;
The following example returns existing Query Store hints for query_id 39:
SELECT query_hint_id,
query_id,
query_hint_text,
last_query_hint_failure_reason,
last_query_hint_failure_reason_desc,
query_hint_failure_count,
source,
source_desc
FROM sys.query_store_query_hints
WHERE query_id = 39;
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today