Query Store SELECT Performance
Running a query against a large Query Store repository (10 GB) can be really slow if filtering on runtime stats intervals.
It looks like an index is missing on sys.query_store_runtime_stats (runtime_stats_interval_id).
Upvotes: 3<=-=May 27 2017 6:38AM=-=>
Thank you for taking the time to post this issue! We understand that this could be an important performance improvement.
Performance tuning is of such scenarios is not a trivial task. Change of such feature as Query Store can speed up one scenario and lead to degradation in others. We�ll look more into this particular use case and see what we can do.
Alex Friedman commented
Querying the Query Store is especially important during a production performance issue -- and that's also when it's so difficult to get results quickly from it due to the performance of its queries. Please fix it!