~/talk

Let's Talk About MySQL Query Tuning

Talkat Percona Community Live 2022 · 2022-06-21..06-23· [databases]
links:none on file
slides:none on file

Sets long_query_time and watches the slow_queries counter, aiming for aim for ~1 slow query/sec; captures logs to file/table or TCP dump and groups fingerprinted SQL with pt-query-digest or PMM. Uses EXPLAIN (extended/partition), optimizer_trace and EXPLAIN ANALYZE to compare estimates vs actuals. Fixes include adding covering or function-based indexes, turning IN/subqueries into JOINs, including partition keys, and removing SELECT *; tunes sort_buffer, tmp_table_size, join_buffer and buffer_pool; checks persistent stats via sample_pages and auto_recalc.

AI-written summary · about

  1. 0:00Introduction
  2. 4:01User Perception
  3. 5:11Total Query Time
  4. 5:21Log Time
  5. 6:23Optimizer
  6. 7:24Background Tasks
  7. 8:42Recap
  8. 9:15Query Tuning Cycle
  9. 10:16Slow Query Threshold
  10. 12:26Slow Query Log
  11. 14:50Analyze Slow Queries
  12. 19:40Explain Output
  13. 21:47Tree Table Join
  14. 22:41Rows Column
  15. 24:35Access Type
  16. 29:17Extra Column
  17. 36:24Execution Plan Improvements
  18. 39:14Query Tuning Alternatives
  19. 46:31Additional Tuning
  20. 49:00Server Configuration Tuning
  21. 51:57Engine Independent Statistics
  22. 52:19MySQL Percona
~/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.