~/talk

Tackling Slow Queries: A Practical Approach to Prevention and Correction

Talkat SREcon25 Americas · 2025-03-25..03-27· [databases, observability]
linkedin:kurnifamili
slides:none on file

Shopify reports peaks like $4.6M per minute and serves 10.5 trillion queries so slow SQL causes about one in five merchant‑impacting incidents. The build is two parts: a correction pipeline that reads MySQL slow‑query logs with Vector, ships them to Observe, autocreates and autoassigns audit action items and a Grafana dashboard to prioritize worst offenders, and a prevention flow that hooks CI via an ActiveRecord subscriber to run EXPLAIN, comment on PRs for full table scans and block overdue fixes. The system shortens feedback loops and catches many regressions before production.

AI-written summary · about

  1. 0:00Slow query challenges at Shopify
  2. 3:48Shopify’s mission and database resilience
  3. 5:12Short-term database scaling
  4. 6:35Long-term database resiliency
  5. 8:21Extracting services for reliability
  6. 10:30Better query writing for developers
  7. 11:33Gaps in slow query prevention
  8. 12:39Incident remediation lifecycle
  9. 14:24Gaps in previous slow query system
  10. 14:45Automated slow query detection
  11. 16:33Reducing incident dependency
  12. 17:56Ownership and accountability
  13. 19:44Debugging resources for developers
  14. 22:31Preventing slow queries in CI
  15. 23:15Detecting full table scans
  16. 25:47Slow query prevention in PRs
  17. 27:59Shifting left with VS Code
  18. 28:41Key takeaways
  19. 31:54Closing remarks and Q&A
~/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.