We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5fffeb8 + 38b631b commit 20a017fCopy full SHA for 20a017f
1 file changed
sp_QuickieStore/sp_QuickieStore.sql
@@ -5606,10 +5606,10 @@ OUTER APPLY
5606
qsp.last_execution_time DESC
5607
),
5608
qsp.query_plan
5609
- FROM #hi_id_staging_queries AS sq
+ FROM #hi_id_staging_plans AS sp
5610
JOIN ' + @database_name_quoted + N'.sys.query_store_plan AS qsp
5611
- ON qsp.query_id = sq.query_id
5612
- WHERE sq.query_hash = o.query_hash
+ ON qsp.plan_id = sp.plan_id
+ WHERE sp.query_hash = o.query_hash
5613
) AS qp0
5614
WHERE qp0.n = 1
5615
) AS qp
0 commit comments