~/talk

Common Table Expressions and Window Functions simple, maintainable, fast queries

links:none on file
slides:none on file

MariaDB Server 10.2 adds Common Table Expressions and window functions and shows concrete performance gains: rewriting running-account sums with PARTITION/ORDER/ROWS replaces per-row subqueries, top-N-per-group using RANK plus a CTE scans 20M rows in one pass instead of exploding joins, and using lag/lead computes service-interval deltas on 100M rows in minutes (~5 min) rather than not finishing. The implementation supports merging and condition pushdown but not yet CTE reuse, and GROUP_CONCAT and certain range-frame features remain unimplemented.

AI-written summary · about

  1. 0:00Introduction
  2. 4:20Optimizations
  3. 8:27Database vendors
  4. 12:45Window functions
  5. 18:22Window function example
  6. 22:51Practical examples
  7. 25:58Top in query
  8. 31:23Summary
~/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.