When opening the query store for the first time on any give day, it will take a VERY long time to output data.
I took a SQL script from this redgate blog article :
Top 10 most expensive queries based on average runtime
SELECT TOP 10 qt.query_sql_text, CAST(query_plan AS XML) AS 'Execution Plan', rs.avg_duration FROM sys.query_store_plan qp INNER JOIN sys.query_store_query q ON qp.query_id = q.query_id INNER JOIN sys.query_store_query_text qt ON q.query_text_id = qt.query_text_id INNER JOIN sys.query_store_runtime_stats rs ON qp.plan_id = rs.plan_id ORDER BY rs.avg_duration DESC;
After leaving this query running for 11 minutes I canceled it as it wasn't returning anything. Why is that so? Opening the query store through the GUI will result in the same issue.
In this screenshot you can see how cpu-intensive this query is, why is that so ? Did I improperly configure my query store, is there anything more to do than simply enable the query store and query away ?