File tree Expand file tree Collapse file tree
samples/features/query-store Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88-- ************************************************************************ --
99
1010/*
11- Demo prep, in PropertyMLS
11+ Demo prep, connect to the PropertyMLS database
1212*/
1313
1414ALTER 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);
1717GO
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
6767GO
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)' ;
7474GO
7575
7676/*
128128-- You should see one plan again.
129129EXEC [dbo].[PropertySearchByAgent] 101 ;
130130EXEC [dbo].[PropertySearchByAgent] 4 ;
131- GO
131+ GO
You can’t perform that action at this time.
0 commit comments