Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 83d92cb

Browse files
committed
Refresh sp_query_store_clear_hints article
1 parent 3ccbd7f commit 83d92cb

1 file changed

Lines changed: 34 additions & 29 deletions

File tree

docs/relational-databases/system-stored-procedures/sys-sp-query-store-clear-hints-transact-sql.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "sp_query_store_clear_hints (Transact-SQL)"
33
description: "The sp_query_store_clear_hints system stored procedure removes all Query Store hints for a given query."
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: "05/24/2022"
6+
ms.date: 05/02/2023
77
ms.service: sql
88
ms.subservice: system-objects
99
ms.topic: "language-reference"
@@ -20,56 +20,61 @@ dev_langs:
2020
monikerRange: "=azuresqldb-current||=azuresqldb-mi-current||>=sql-server-ver16||>=sql-server-linux-ver16"
2121
---
2222
# sp_query_store_clear_hints (Transact-SQL)
23+
2324
[!INCLUDE [sqlserver2022-asdb-asmi](../../includes/applies-to-version/sqlserver2022-asdb-asmi.md)]
2425

25-
Removes all [Query Store hints](../performance/query-store-hints.md) for a given query_id.
26-
27-
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
28-
29-
## Syntax
30-
26+
Removes all [Query Store hints](../performance/query-store-hints.md) for a given query ID.
27+
28+
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
29+
30+
## Syntax
31+
3132
```syntaxsql
3233
sp_query_store_clear_hints
33-
@query_id bigint;
34-
```
34+
[ @query_id = ] query_id;
35+
```
3536

3637
## Arguments
3738

38-
#### @query_id
39+
#### *query_id*
40+
41+
The Query Store `query_id` column from [sys.query_store_query](../system-catalog-views/sys-query-store-query-transact-sql.md). *query_id* is a **bigint**.
42+
43+
## Return values
3944

40-
The Query Store `query_id` from [sys.query_store_query](../system-catalog-views/sys-query-store-query-transact-sql.md). query_id is a bigint.
45+
0 (success) or 1 (failure)
4146

42-
## Return Values
43-
0 (success) or 1 (failure)
44-
45-
## Remarks
46-
Query Store hints are created by [sys.sp_query_store_set_hints (Transact-SQL)](sys-sp-query-store-set-hints-transact-sql.md).
47+
## Remarks
4748

48-
## Permissions
49-
Requires the **ALTER** permission on the database.
50-
51-
## Examples
49+
Query Store hints are created by [sys.sp_query_store_set_hints (Transact-SQL)](sys-sp-query-store-set-hints-transact-sql.md).
50+
51+
## Permissions
52+
53+
Requires the **ALTER** permission on the database.
54+
55+
## Examples
5256

5357
### Clear query hint text
5458

55-
The following example removes the query store hint text for query id 39:
56-
59+
The following example removes the Query Store hint text for *query_id* 39:
60+
5761
```sql
5862
EXEC sys.sp_query_store_clear_hints @query_id = 39;
59-
```
63+
```
6064

6165
### View Query Store hints
6266

63-
The following example returns existing Query Store hints for query id 39:
67+
The following example returns existing Query Store hints for *query_id* 39:
6468

6569
```sql
66-
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
67-
FROM sys.query_store_query_hints
70+
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
71+
FROM sys.query_store_query_hints
6872
WHERE query_id = 39;
6973
```
7074

7175
## Next steps
72-
- [sys.sp_query_store_set_hints (Transact-SQL)](sys-sp-query-store-set-hints-transact-sql.md)
73-
- [sys.query_store_query_hints (Transact-SQL)](../system-catalog-views/sys-query-store-query-hints-transact-sql.md)
76+
77+
- [sys.sp_query_store_set_hints (Transact-SQL)](sys-sp-query-store-set-hints-transact-sql.md)
78+
- [sys.query_store_query_hints (Transact-SQL)](../system-catalog-views/sys-query-store-query-hints-transact-sql.md)
7479
- [Query Store hints](../performance/query-store-hints.md).
75-
- [Monitoring Performance By Using the Query Store](../../relational-databases/performance/monitoring-performance-by-using-the-query-store.md)
80+
- [Monitoring Performance By Using the Query Store](../../relational-databases/performance/monitoring-performance-by-using-the-query-store.md)

0 commit comments

Comments
 (0)