Transit Azure SQL Query Performance Insight highlights expensive key lookups on vehicle_id in active fleet queries. What should the SQL AI developer do next?
Select an answer to reveal the explanation.
Short Explanation
When QPI waves a flag at vehicle_id key lookups, that’s your cue to widen or add the right index—fix the dashboard, then fix the road, don’t hide the warning light.
Full Explanation
When Query Performance Insight highlights expensive key lookups on vehicle_id in active transit fleet queries, the next step is to turn that finding into index tuning: add or adjust a supporting/covering index so fleet queries can satisfy predicates and selected columns without repeated base-table lookups. QPI’s value is triage—once vehicle_id lookups dominate cost, covering INCLUDE columns or a better key order typically cuts CPU and IO for dispatch-style access patterns. Disabling Query Performance Insight only hides the report; it does not remove lookup cost from the fleet workload. Converting every fleet table to a ledger table adds immutable transaction tracking and is unrelated to eliminating key lookups; ledger is a integrity/audit feature, not an index strategy. Granting CONTROL SERVER to the dispatch app pool identity is a dangerous privilege escalation that does nothing to fix lookup operators in plans. Exam caveat: not every key lookup is worth covering—very selective seeks with tiny lookup cost may not justify wider indexes and write overhead on busy vehicle telematics tables. Also validate that the lookup is on the clustered key versus a heap RID; design differs. Watch for duplicate or overlapping indexes after adding cover indexes. Operational check: open the QPI-highlighted query’s actual plan and confirm the key lookup operator and output columns; design a nonclustered index on vehicle_id INCLUDING the looked-up columns used by the fleet query; deploy to a test transit database; re-run the query and QPI/Query Store metrics to confirm lookups disappear and write impact on vehicle updates remains acceptable.