The five-step guide to SQL tuning
summary
Five concrete steps: start by confirming the requirement and consider a cheaper data source (example: replacing a full scan of hundreds of millions of transactions with the customer modification timestamp solved the problem with zero cost), then find bad SQL using V$SQLSTATS not V$SQL, triage with hints and drill into plans using GATHER_PLAN_STATISTICS and DBMS_XPLAN (example showed optimizer estimating 25k rows vs 114k actual), use extended stats or SQL Plan Management to cure regressions.
AI-written summary · about
chapters (10)
- 0:00Introduction to tuning
- 1:21The first rule of tuning
- 7:27Tuning user experience
- 8:49Identifying problematic SQL
- 10:54Validating the query
- 13:43Analyzing execution plans
- 17:27Triage with hints
- 20:04Permanent fixes and stats
- 22:24SQL plan management
- 24:53Conclusion and steps
related talks
01h 00m7 Tips to Performance Tuning, Optimization, and Everything
57mYour Performance Tuning Check List
53mWhen to stop tuning a query
24mTop 5 PostgreSQL Query Tuning Tips
43mPerformance Tuning, Getting the Biggest Bang for Your Buck
53mWhen to stop tuning a query
20mLevel up your SQL skills as a developer
49mAssessing and Optimize Enterprise SQL Server Environments
