{"id":1182,"date":"2021-03-08T08:30:00","date_gmt":"2021-03-08T05:30:00","guid":{"rendered":"https:\/\/www.dataplatform.gr\/?p=1182"},"modified":"2025-01-15T14:35:08","modified_gmt":"2025-01-15T11:35:08","slug":"ti-einai-to-query-store-kai-pos-to-chrisi","status":"publish","type":"post","link":"https:\/\/www.dataplatform.gr\/en\/ti-einai-to-query-store-kai-pos-to-chrisi\/","title":{"rendered":"What is Query Store and how we use it in SQL Server"},"content":{"rendered":"<p>The <strong>Query Store<\/strong> appeared from the release <strong>SQL Server 2016<\/strong> and then. It is a tool provided so that we can track each <strong>query <\/strong>(query) to the database. <\/p>\n\n\n\n<p>Through the Query Store we can see a query, when it was executed, its duration, the <strong>execution plan<\/strong> which he used and many others.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Let&#039;s remember what the execution plan is<\/h2>\n\n\n\n<p>The <strong>execution plan<\/strong> is essentially a map that you create from the RDBMS query optimizer taking into account the <strong>statistics\/cardinality<\/strong> to find the optimal way to pass the data for the process we have asked it to do.<\/p>\n\n\n\n<p>Through Query Store we can see it <strong>execution plan<\/strong> (plan) that existed every time each query was executed over time and to identify when the plan changed. It enables us to do <strong>force <\/strong>the plan so that the optimizer does not choose but we declare that we want the specific one.<\/p>\n\n\n\n<p>Very useful features are also the ability to see which queries are the most expensive, the history of each query, how many times the query was executed in a certain period of time and when the performance of a query dropped due to a change of plan.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"275\" height=\"278\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/1-qs.png\" alt=\"\" class=\"wp-image-1185\"\/><figcaption class=\"wp-element-caption\">The Query Store in the SSMS GUI.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to enable and configure with T-SQL<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>To activate it, simply run the command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition] SET QUERY_STORE = ON;<\/pre>\n\n\n\n<p>With the <strong>OPERATION_MODE<\/strong> we define whether in the Query Store we will only be able to read data <strong>READ_ONLY <\/strong>or that it will be updated with new ones <strong>READ_WRITE<\/strong>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition] \nSET QUERY_STORE (OPERATION_MODE = READ_WRITE); <\/pre>\n\n\n\n<p>The<strong> MAX_STORAGE_SIZE_MB<\/strong> is the query store data size limit. In a production environment the value must be above 2048 MB, but the value must also be proportional to the number of days in case we set the number of days <strong>STALE_QUERY_THRESHOLD_DAYS <\/strong>in 90 days e.g. it is recommended to use 8192 MB and accordingly <strong>current_storage_usage <\/strong>in the <strong>sys<\/strong>.<strong>database_query_store_options<\/strong>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition] \nSET QUERY_STORE (MAX_STORAGE_SIZE_MB = 1024); <\/pre>\n\n\n\n<p>With the parameter <strong>SIZE_BASED_CLEANUP_MODE <\/strong>= <strong>AUTO <\/strong>when Query Store data approaches the maximum size the oldest will be deleted. Otherwise case defined as <strong>OFF <\/strong>the operation mode changes to read-only, as a result of which the collection of new data is stopped:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition] \nSET QUERY_STORE (SIZE_BASED_CLEANUP_MODE = AUTO); <\/pre>\n\n\n\n<p>With the parameter <strong>CLEANUP_POLICY<\/strong> we define for how many days the data will be kept. The higher the value, the more disk space it will consume:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition] \n\nSET QUERY_STORE (CLEANUP_POLICY = (STALE_QUERY_THRESHOLD_DAYS = 30));<\/pre>\n\n\n\n<p>The <strong>Interval Length Minutes <\/strong>determines every time the query statistics (duration, tempdb_usage, memory_usage, count executions, etc.) will be aggregated (average, sum ...) in a different record in the table <strong>sys<\/strong>.<strong>query_store_runtime_stats <\/strong>. The smaller the value, the more information we have over time, but at the same time the data on the disk increases:<\/p>\n\n\n\n<p><em>*Caution this parameter can only take specific values (1, 5, 10, 15, 30, 60, 1440)<\/em><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition]  \n\nSET QUERY_STORE (INTERVAL_LENGTH_MINUTES = 60);<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"812\" height=\"139\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/15-qs.png\" alt=\"\" class=\"wp-image-2308\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/15-qs.png 812w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/15-qs-300x51.png 300w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/15-qs-768x131.png 768w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" \/><figcaption class=\"wp-element-caption\">Example with the interval set to 60 minutes, we see a different record with hourly statistics<\/figcaption><\/figure>\n\n\n\n<p>That <strong>data flush interval <\/strong>&nbsp;is the time in seconds that query store statistics are written from memory to disk. In case of memory pressure, this parameter is automatically ignored and the data on the disk is flushed at that moment. As long as this data has not been flushed, it will not be visible in the dynamic views of the Query Store. Suggested value of 900 seconds (15 minutes):<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition]  \n\nSET QUERY_STORE (DATA_FLUSH_INTERVAL_SECONDS = 900);\n\n<\/pre>\n\n\n\n<p>With the parameter <strong>ALL <\/strong>in the &nbsp;<strong>QUERY_CAPTURE_MODE <\/strong>we define to record all the queries that are executed. With the parameter <strong>AUTO<\/strong> only those queries that have been executed many times or have a long duration will be recorded. With the parameter <strong>NONE<\/strong> the statistics will be updated only for those queries that have already been recorded:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition]  \n\nSET QUERY_STORE (QUERY_CAPTURE_MODE = ALL);<\/pre>\n\n\n\n<p>To <strong>SQL Server 2019<\/strong> we also have the choice <strong>CUSTOM<\/strong> where we can define multiple criteria, e.g.:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition]  SET QUERY_CAPTURE_POLICY = (\n        STALE_CAPTURE_POLICY_THRESHOLD = 24 HOURS,\n        EXECUTION_COUNT = 30,\n        TOTAL_COMPILE_CPU_TIME_MS = 1000,\n        TOTAL_EXECUTION_CPU_TIME_MS = 100\n      );\n<\/pre>\n\n\n\n<p>Also in SQL Server 2017 \/ 2019 we have the possibility to define whether the wait statistics will also be recorded with the parameter <strong>WAIT_STATS_CAPTURE_MODE <\/strong>which default is ON:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition]\nSET QUERY_STORE (WAIT_STATS_CAPTURE_MODE = ON);<\/pre>\n\n\n\n<p>Done with the parameter <strong>MAX_PLANS_PER_QUERY<\/strong> we define the maximum number of shots per query. The value 200 is the default and we recommend leaving it as is:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition]\nSET QUERY_STORE (MAX_PLANS_PER_QUERY = 200);<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Query Store Activation Example for SQL Server 2019<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition] \n\nSET QUERY_STORE = ON\n    (\n      OPERATION_MODE = READ_WRITE,\n      CLEANUP_POLICY = ( STALE_QUERY_THRESHOLD_DAYS = 90 ),\n      DATA_FLUSH_INTERVAL_SECONDS = 900,\n      MAX_STORAGE_SIZE_MB = 2048,\n      INTERVAL_LENGTH_MINUTES = 60,\n      SIZE_BASED_CLEANUP_MODE = AUTO,\n      MAX_PLANS_PER_QUERY = 200,\n      WAIT_STATS_CAPTURE_MODE = ON,\n      QUERY_CAPTURE_MODE = CUSTOM,\n      QUERY_CAPTURE_POLICY = (\n        STALE_CAPTURE_POLICY_THRESHOLD = 24 HOURS,\n        EXECUTION_COUNT = 30,\n        TOTAL_COMPILE_CPU_TIME_MS = 1000,\n        TOTAL_EXECUTION_CPU_TIME_MS = 100\n      )\n   );<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">How we check the good operation of the Query Store<\/h2>\n\n\n\n<p>To check the status, the space used and the parameters of the query store:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">select * from sys.database_query_store_options; <\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"913\" height=\"180\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/12-qs.png\" alt=\"\" class=\"wp-image-2294\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/12-qs.png 913w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/12-qs-300x59.png 300w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/12-qs-768x151.png 768w\" sizes=\"auto, (max-width: 913px) 100vw, 913px\" \/><\/figure>\n\n\n\n<p>To clear the space of all data taking up space:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition] SET QUERY_STORE CLEAR;<\/pre>\n\n\n\n<p>If the query store stops working, we can do a check with the procedure:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">exec sp_query_store_consistency_check;<\/pre>\n\n\n\n<p>To disable the Query Store hard way which, however, has the effect of not writing the data that is in memory to the disk:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">ALTER DATABASE [partition] SET QUERY_STORE = OFF (FORCED);<\/pre>\n\n\n\n<p>In editions before <strong>SQL Server 2019 <\/strong>should be enabled <em>trace flag 7745<\/em>. Its function is in the event of a shutdown or failover not to wait to write all the Query Store data that is in memory to the disk. Otherwise the Query Store would delay the restart of the instance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Extracting useful information with T-SQL<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">The query I made that makes our life easier...<\/h5>\n\n\n\n<p>We can do <strong>aggregate <\/strong>the data so that we can see for each plan that ran a query a comparison between them <strong>last interval  <\/strong>and his <strong>total, <\/strong>average of the statistics (run time, memory usage, tempdb, log usage, etc.). We can also see the full graphic of the shot:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">SELECT p.plan_id, p.query_id,qt.query_sql_text\n,case when q.object_id = 0 then 'ad_hoc' else OBJECT_NAME(q.object_id) end as object_name\n,DATEADD(HOUR,DATEDIFF(hour,  SYSUTCDATETIME(),SYSDATETIME() ),q.last_execution_time) as last_execution_time\n,ad.last_duration as agg_last_duration\n,ad.avg_duration_aggregate\n,cast(p.query_plan as xml) query_plan\n,ad.count_executions\n,ad.avg_tempdb_space_used\n,ad.avg_log_bytes_used\n,ad.avg_query_max_used_memory\n,ad.max_dop\nFROM sys.query_store_query AS q\ninner JOIN sys.query_store_plan AS p on p.query_id = q.query_id\ninner JOIN sys.query_store_query_text AS qt on q.query_text_id = qt.query_text_id  \ninner JOIN (select plan_id,avg(last_duration)as last_duration,avg(avg_duration)as avg_duration_aggregate,sum(count_executions) as count_executions, avg(avg_query_max_used_memory) as avg_query_max_used_memory,  avg(avg_tempdb_space_used) as avg_tempdb_space_used,avg(avg_log_bytes_used) as avg_log_bytes_used,max(max_dop) max_dop  from sys.query_store_runtime_stats group by plan_id ) as ad on ad.plan_id = p.plan_id\nWHERE 1=1\n--and p.is_forced_plan = 1 \n--and  p.query_id = 201\n--and  qt.query_sql_text like '%SELECT p.plan_id%'\norder by q.last_execution_time,q.query_id desc;<\/pre>\n\n\n\n<p><em>*dateadd is needed because SQL Server normally brings the dates in UTC time zone.<\/em><\/p>\n\n\n\n<p><em>**The cast to query_plan is needed so that when we click on the plan, the graphic opens.<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"855\" height=\"170\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/13-qs.png\" alt=\"\" class=\"wp-image-2302\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/13-qs.png 855w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/13-qs-300x60.png 300w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/13-qs-768x153.png 768w\" sizes=\"auto, (max-width: 855px) 100vw, 855px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"216\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/14-qs.png\" alt=\"\" class=\"wp-image-2304\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/14-qs.png 614w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/14-qs-300x106.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">To see which shots are forced and the reason they may have failed to be made<\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">SELECT p.plan_id, p.query_id, qt.query_sql_text,q.object_id as containing_object_id, \n    force_failure_count, last_force_failure_reason_desc \nFROM sys.query_store_plan AS p \ninner JOIN sys.query_store_query AS q on p.query_id = q.query_id\ninner JOIN sys.query_store_query_text AS qt on q.query_text_id = qt.query_text_id  \nWHERE is_forced_plan = 1; <\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"148\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/9-qs.png\" alt=\"\" class=\"wp-image-2288\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/9-qs.png 760w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/9-qs-300x58.png 300w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The information we see with the Query Store GUI<\/h2>\n\n\n\n<p>The convenience that Query Store provides us is the extensive use of a graphical environment. Let&#039;s take a detailed look at the screens it provides:<\/p>\n\n\n\n<p>Query wait statistics:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"514\" height=\"328\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/2-qs.png\" alt=\"\" class=\"wp-image-1186\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/2-qs.png 514w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/2-qs-300x191.png 300w\" sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/figure>\n\n\n\n<p>The queries that consumed the most resources:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"506\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/3-qs.png\" alt=\"\" class=\"wp-image-1187\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/3-qs.png 1024w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/3-qs-300x148.png 300w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/3-qs-768x380.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We can customize the data we see and change the filters:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"339\" height=\"718\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/4-qs.png\" alt=\"\" class=\"wp-image-1183\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/4-qs.png 339w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/4-qs-142x300.png 142w\" sizes=\"auto, (max-width: 339px) 100vw, 339px\" \/><\/figure>\n\n\n\n<p>We can see the queries that are forced, the plan and the changes made to the plan over time.<\/p>\n\n\n\n<p>When we select a query from the query report it shows us all the shots that have changed over time. By selecting the button <strong>&quot;Force Plan&quot;<\/strong> we declare that from now on we want it to always run with the specific plan.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"992\" height=\"471\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/5-qs.png\" alt=\"\" class=\"wp-image-1184\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/5-qs.png 992w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/5-qs-300x142.png 300w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/5-qs-768x365.png 768w\" sizes=\"auto, (max-width: 992px) 100vw, 992px\" \/><\/figure>\n\n\n\n<p>In closing, we should not forget that like every extra function we add to a server, so too <strong>Query Store <\/strong>in SQL Server it comes with one <strong>overhead<\/strong>, which will reduce performance even to a small degree.<\/p>\n\n\n\n<p>We can change the parameters according to the problem we face in each case. It may still not be beneficial for our system to activate it at all and instead to activate the corresponding Extended Event (from SQL Server 2017 CU 14 version onwards). <\/p>\n\n\n\n<p>We will see how this is done in the next article...!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sources:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/performance\/best-practice-with-the-query-store?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft Query Store<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Query Store appeared from SQL Server 2016 onwards. It is a tool provided so that we can track each query in the database. Through the Query Store we can see a query when it was executed, its duration, the execution plan it used and much more. Let&#039;s remember [\u2026]<\/p>","protected":false},"author":1,"featured_media":702,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,15],"tags":[29,23,48,119,6],"class_list":["post-1182","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-ms-sqlserver","tag-databases","tag-microsoft","tag-performance_tuning","tag-query-store","tag-sqlserver"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dataplatform.gr\/en\/ti-einai-to-query-store-kai-pos-to-chrisi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr\" \/>\n<meta property=\"og:description\" content=\"\u03a4\u03bf Query Store \u03b5\u03bc\u03c6\u03b1\u03bd\u03af\u03c3\u03c4\u03b7\u03ba\u03b5 \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03ad\u03ba\u03b4\u03bf\u03c3\u03b7 SQL Server 2016 \u03ba\u03b1\u03b9 \u03ad\u03c0\u03b5\u03b9\u03c4\u03b1. \u0395\u03af\u03bd\u03b1\u03b9 \u03ad\u03bd\u03b1 \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03bf \u03c0\u03bf\u03c5 \u03c0\u03b1\u03c1\u03ad\u03c7\u03b5\u03c4\u03b1\u03b9 \u03ce\u03c3\u03c4\u03b5 \u03bd\u03b1 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03c0\u03b1\u03c1\u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03ae\u03c3\u03bf\u03c5\u03bc\u03b5 \u03c4\u03bf \u03ba\u03ac\u03b8\u03b5 query (\u03b5\u03c1\u03ce\u03c4\u03b7\u03bc\u03b1) \u03c3\u03c4\u03b7 \u03b2\u03ac\u03c3\u03b7 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd. \u039c\u03ad\u03c3\u03b1 \u03b1\u03c0\u03cc \u03c4\u03bf Query Store \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03b4\u03bf\u03cd\u03bc\u03b5 \u03ad\u03bd\u03b1 query \u03c4\u03bf \u03c0\u03cc\u03c4\u03b5 \u03b5\u03ba\u03c4\u03b5\u03bb\u03ad\u03c3\u03c4\u03b7\u03ba\u03b5, \u03c4\u03b7\u03bd \u03b4\u03b9\u03ac\u03c1\u03ba\u03b5\u03b9\u03b1 \u03c4\u03bf\u03c5, \u03c4\u03bf execution plan \u03c0\u03bf\u03c5 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b5 \u03ba\u03b1\u03b9 \u03c0\u03bf\u03bb\u03bb\u03ac \u03ac\u03bb\u03bb\u03b1. \u0391\u03c2 \u03b8\u03c5\u03bc\u03b7\u03b8\u03bf\u03cd\u03bc\u03b5 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dataplatform.gr\/en\/ti-einai-to-query-store-kai-pos-to-chrisi\/\" \/>\n<meta property=\"og:site_name\" content=\"DataPlatform.gr\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dataplatform.gr\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-08T05:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-15T11:35:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Stratos Matzouranis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stratos Matzouranis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/\"},\"author\":{\"name\":\"Stratos Matzouranis\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/person\\\/e87bf4fd02b65cb6aa0942f87245bbaf\"},\"headline\":\"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server\",\"datePublished\":\"2021-03-08T05:30:00+00:00\",\"dateModified\":\"2025-01-15T11:35:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/\"},\"wordCount\":222,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"keywords\":[\"Databases\",\"Microsoft\",\"Performance Tuning\",\"Query Store\",\"SQL Server\"],\"articleSection\":[\"Databases\",\"Microsoft SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/\",\"name\":\"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"datePublished\":\"2021-03-08T05:30:00+00:00\",\"dateModified\":\"2025-01-15T11:35:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"contentUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_sqlserver.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/ti-einai-to-query-store-kai-pos-to-chrisi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0391\u03c1\u03c7\u03b9\u03ba\u03ae\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Databases\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/category\\\/databases\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Microsoft SQL Server\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/category\\\/databases\\\/ms-sqlserver\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#website\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/\",\"name\":\"dataplatform.gr - Sky is not the limit!\",\"description\":\"\u0398\u03b5\u03c9\u03c1\u03af\u03b1, \u03bf\u03b4\u03b7\u03b3\u03bf\u03af \u03ba\u03b1\u03b9 \u03c3\u03ba\u03ad\u03c8\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03c4\u03b7 \u03b4\u03bf\u03c5\u03bb\u03b5\u03b9\u03ac \u03c3\u03b1\u03c2 \u03c0\u03b9\u03bf \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03b9\u03ba\u03ac \u03ba\u03b1\u03b9 \u03c0\u03b9\u03bf \u03b5\u03cd\u03ba\u03bf\u03bb\u03b1 \u03c0\u03ac\u03bd\u03c9 \u03c3\u03c4\u03b9\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd, \u03c3\u03c4\u03b7\u03bd SQL, \u03c3\u03c4\u03bf Business Intelligence \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b3\u03b5\u03bd\u03b9\u03ba\u03cc\u03c4\u03b5\u03c1\u03b1.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dataplatform.gr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\",\"name\":\"dataplatform.gr\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_logo_wbacki.png\",\"contentUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_logo_wbacki.png\",\"width\":322,\"height\":139,\"caption\":\"dataplatform.gr\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dataplatform.gr\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dataplatform-gr\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/person\\\/e87bf4fd02b65cb6aa0942f87245bbaf\",\"name\":\"Stratos Matzouranis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"caption\":\"Stratos Matzouranis\"},\"sameAs\":[\"https:\\\/\\\/www.dataplatform.gr\"],\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/en\\\/author\\\/stratos-matzouranis\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dataplatform.gr\/en\/ti-einai-to-query-store-kai-pos-to-chrisi\/","og_locale":"en_US","og_type":"article","og_title":"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr","og_description":"\u03a4\u03bf Query Store \u03b5\u03bc\u03c6\u03b1\u03bd\u03af\u03c3\u03c4\u03b7\u03ba\u03b5 \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03ad\u03ba\u03b4\u03bf\u03c3\u03b7 SQL Server 2016 \u03ba\u03b1\u03b9 \u03ad\u03c0\u03b5\u03b9\u03c4\u03b1. \u0395\u03af\u03bd\u03b1\u03b9 \u03ad\u03bd\u03b1 \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03bf \u03c0\u03bf\u03c5 \u03c0\u03b1\u03c1\u03ad\u03c7\u03b5\u03c4\u03b1\u03b9 \u03ce\u03c3\u03c4\u03b5 \u03bd\u03b1 \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03c0\u03b1\u03c1\u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03ae\u03c3\u03bf\u03c5\u03bc\u03b5 \u03c4\u03bf \u03ba\u03ac\u03b8\u03b5 query (\u03b5\u03c1\u03ce\u03c4\u03b7\u03bc\u03b1) \u03c3\u03c4\u03b7 \u03b2\u03ac\u03c3\u03b7 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd. \u039c\u03ad\u03c3\u03b1 \u03b1\u03c0\u03cc \u03c4\u03bf Query Store \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03b4\u03bf\u03cd\u03bc\u03b5 \u03ad\u03bd\u03b1 query \u03c4\u03bf \u03c0\u03cc\u03c4\u03b5 \u03b5\u03ba\u03c4\u03b5\u03bb\u03ad\u03c3\u03c4\u03b7\u03ba\u03b5, \u03c4\u03b7\u03bd \u03b4\u03b9\u03ac\u03c1\u03ba\u03b5\u03b9\u03b1 \u03c4\u03bf\u03c5, \u03c4\u03bf execution plan \u03c0\u03bf\u03c5 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b5 \u03ba\u03b1\u03b9 \u03c0\u03bf\u03bb\u03bb\u03ac \u03ac\u03bb\u03bb\u03b1. \u0391\u03c2 \u03b8\u03c5\u03bc\u03b7\u03b8\u03bf\u03cd\u03bc\u03b5 [&hellip;]","og_url":"https:\/\/www.dataplatform.gr\/en\/ti-einai-to-query-store-kai-pos-to-chrisi\/","og_site_name":"DataPlatform.gr","article_publisher":"https:\/\/www.facebook.com\/dataplatform.gr\/","article_published_time":"2021-03-08T05:30:00+00:00","article_modified_time":"2025-01-15T11:35:08+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","type":"image\/png"}],"author":"Stratos Matzouranis","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stratos Matzouranis","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/#article","isPartOf":{"@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/"},"author":{"name":"Stratos Matzouranis","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/person\/e87bf4fd02b65cb6aa0942f87245bbaf"},"headline":"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server","datePublished":"2021-03-08T05:30:00+00:00","dateModified":"2025-01-15T11:35:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/"},"wordCount":222,"commentCount":2,"publisher":{"@id":"https:\/\/www.dataplatform.gr\/#organization"},"image":{"@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","keywords":["Databases","Microsoft","Performance Tuning","Query Store","SQL Server"],"articleSection":["Databases","Microsoft SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/","url":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/","name":"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server - DataPlatform.gr","isPartOf":{"@id":"https:\/\/www.dataplatform.gr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/#primaryimage"},"image":{"@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","datePublished":"2021-03-08T05:30:00+00:00","dateModified":"2025-01-15T11:35:08+00:00","breadcrumb":{"@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/#primaryimage","url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","contentUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_sqlserver.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/www.dataplatform.gr\/ti-einai-to-query-store-kai-pos-to-chrisi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0391\u03c1\u03c7\u03b9\u03ba\u03ae","item":"https:\/\/www.dataplatform.gr\/"},{"@type":"ListItem","position":2,"name":"Databases","item":"https:\/\/www.dataplatform.gr\/category\/databases\/"},{"@type":"ListItem","position":3,"name":"Microsoft SQL Server","item":"https:\/\/www.dataplatform.gr\/category\/databases\/ms-sqlserver\/"},{"@type":"ListItem","position":4,"name":"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Query Store \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03c4\u03bf \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c4\u03bf\u03bd SQL Server"}]},{"@type":"WebSite","@id":"https:\/\/www.dataplatform.gr\/#website","url":"https:\/\/www.dataplatform.gr\/","name":"dataplatform.gr - Sky is not the limit!","description":"\u0398\u03b5\u03c9\u03c1\u03af\u03b1, \u03bf\u03b4\u03b7\u03b3\u03bf\u03af \u03ba\u03b1\u03b9 \u03c3\u03ba\u03ad\u03c8\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03c4\u03b7 \u03b4\u03bf\u03c5\u03bb\u03b5\u03b9\u03ac \u03c3\u03b1\u03c2 \u03c0\u03b9\u03bf \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03b9\u03ba\u03ac \u03ba\u03b1\u03b9 \u03c0\u03b9\u03bf \u03b5\u03cd\u03ba\u03bf\u03bb\u03b1 \u03c0\u03ac\u03bd\u03c9 \u03c3\u03c4\u03b9\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd, \u03c3\u03c4\u03b7\u03bd SQL, \u03c3\u03c4\u03bf Business Intelligence \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b3\u03b5\u03bd\u03b9\u03ba\u03cc\u03c4\u03b5\u03c1\u03b1.","publisher":{"@id":"https:\/\/www.dataplatform.gr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dataplatform.gr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dataplatform.gr\/#organization","name":"dataplatform.gr","url":"https:\/\/www.dataplatform.gr\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/logo\/image\/","url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_logo_wbacki.png","contentUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_logo_wbacki.png","width":322,"height":139,"caption":"dataplatform.gr"},"image":{"@id":"https:\/\/www.dataplatform.gr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dataplatform.gr\/","https:\/\/www.linkedin.com\/company\/dataplatform-gr\/"]},{"@type":"Person","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/person\/e87bf4fd02b65cb6aa0942f87245bbaf","name":"Stratos Matzouranis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","caption":"Stratos Matzouranis"},"sameAs":["https:\/\/www.dataplatform.gr"],"url":"https:\/\/www.dataplatform.gr\/en\/author\/stratos-matzouranis\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/1182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/comments?post=1182"}],"version-history":[{"count":1,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/1182\/revisions"}],"predecessor-version":[{"id":5851,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/1182\/revisions\/5851"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/media\/702"}],"wp:attachment":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/media?parent=1182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/categories?post=1182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/tags?post=1182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}