~/talk

Parameter Sensitive Plan Optimization in SQL 2022 ... As Cool as it Sounds?

Talkat SQLBits 2022 · 2022-03-08..03-12· [databases]
links:none on file
links:none on file
slides:none on file

SQL Server 2022 adds Parameter Sensitive Plan Optimization (PSPO) which, at compat level 160, creates a dispatcher plan plus up to three variants per skewed equality predicate (determined from column histograms) and surfaces them in query_store_query_variant. The engine appends an internal predicate-range hint that cannot be reused manually; plans materialize only after execution for that range. PSPO does not handle range or many dynamic-search cases, can still misestimate within a variant (e.g. 115 vs 900,000 estimated rows), relies on fresh stats, and is not yet in Azure SQL.

AI-written summary · about

  1. 0:00Introduction and speaker bios
  2. 1:51Tribute to Hugo Kornelis
  3. 5:37Understanding parameter sniffing
  4. 7:07Demo: Identifying plan skew
  5. 12:45Overview of PSPO
  6. 17:11How PSPO works
  7. 20:46PSPO limitations and scope
  8. 23:52Demo: PSPO in action
  9. 29:19Analyzing PSPO in query store
  10. 40:01Deep dive into edge cases
  11. 43:47Requirements and best practices
  12. 47:39Conclusion and wrap-up
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.