agreed, it's far more fitting for the first point (and that's exactly the approach I'd recommend as well). Trying to express that succinctly and clearly was giving me too much trouble though. — Roland Heath1 min ago
Marked this comment as caught correctly (tp). Currently marked 1tps/0fps. beep boop My human overlords won't let me flag that, so you'll have to do it yourself.
SELECT qsp.plan_id, qsp.query_id, DATALENGTH(qsp.query_plan) as query_plan_datalength
INTO #master_planner
FROM sys.query_store_plan qsp
CREATE INDEX ix_whatever ON #master_planner(query_plan_datalength DESC)
SELECT *
FROM #master_planner
ORDER BY query_plan_datalength DESC