Skip to content

Commit c7ac8e3

Browse files
authored
Merge pull request #938 from WilliamDAssafMSFT/patch-2
Update Query Store Hints Demo.sql
2 parents 67b8f76 + 2557aa1 commit c7ac8e3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

samples/features/query-store/Query Store Hints Demo.sql renamed to samples/features/query-store/query_store_hints_demo.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
-- ************************************************************************ --
99

1010
/*
11-
Demo prep, in PropertyMLS
11+
Demo prep, connect to the PropertyMLS database
1212
*/
1313

1414
ALTER DATABASE [PropertyMLS] SET QUERY_STORE CLEAR;
15-
ALTER DATABASE current SET QUERY_STORE = ON;
16-
ALTER DATABASE current SET QUERY_STORE (QUERY_CAPTURE_MODE = ALL);
15+
ALTER DATABASE CURRENT SET QUERY_STORE = ON;
16+
ALTER DATABASE CURRENT SET QUERY_STORE (QUERY_CAPTURE_MODE = ALL);
1717
GO
1818

1919
-- Should be READ_WRITE
@@ -67,10 +67,10 @@ WHERE query_sql_text like N'%ORDER BY ListingPrice DESC%' and query_sql_text not
6767
GO
6868

6969
/*
70-
We can set the hint associated with the query_id
70+
We can set the hint associated with the query_id returned in the previous result set, as below.
7171
Note, we can designate one or more query hints
7272
*/
73-
EXEC sp_query_store_set_hints 10, N'OPTION(RECOMPILE)';
73+
EXEC sp_query_store_set_hints @query_id=5, @value = N'OPTION(RECOMPILE)';
7474
GO
7575

7676
/*
@@ -128,4 +128,4 @@ GO
128128
-- You should see one plan again.
129129
EXEC [dbo].[PropertySearchByAgent] 101;
130130
EXEC [dbo].[PropertySearchByAgent] 4;
131-
GO
131+
GO

0 commit comments

Comments
 (0)