<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sys.query_store_query on SQL Server Scripts</title><link>https://www.sqlserver70.com/tags/sys.query_store_query/</link><description>Recent content in Sys.query_store_query on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Sun, 26 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/tags/sys.query_store_query/index.xml" rel="self" type="application/rss+xml"/><item><title>Rank Expensive Queries with sys.query_store_runtime_stats</title><link>https://www.sqlserver70.com/post/query-store-top-resource-queries-runtime-stats/</link><pubDate>Sun, 26 Jul 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/query-store-top-resource-queries-runtime-stats/</guid><description>
&lt;p&gt;Query Store buckets runtime statistics into fixed time intervals, which means a query that ran steadily all week doesn't produce one row of history — it produces one row per interval, split further by execution outcome. Averaging those rows unweighted is how a &amp;quot;most expensive queries&amp;quot; report quietly gets the ranking wrong on a busy instance. &lt;code&gt;sys.query_store_runtime_stats&lt;/code&gt; is the catalog view holding that interval-level detail, and joined correctly to plan, query, and query text — with a weighted rollup across execution counts — it produces the resource-consumption ranking a DBA actually wants.&lt;/p&gt;</description></item></channel></rss>