Getting Details on Outstanding SQL Requests
summary
Blackfire profiler inspects a page that issues 50 SQL requests and shows an aggregate of ~20 ms total with a 1.4 ms DB connect and 240 KB result bandwidth, surfaces an N+1 issue through ORM entity counts, and explains why column names and parameters are missing: PDO anonymizes parameters. Enabling the debug add-on disables pruning and anonymization and captures full queries and pruned fast calls so the exact call graph node that triggers each execute is visible for targeted fixes.
AI-written summary · about
chapters (9)
- 0:00SQL request debugging intro
- 1:16Profiling SQL in demo app
- 3:06SQL metrics and DB connections
- 6:35Slow SQL queries and ORM
- 9:49Locating SQL in call graph
- 13:30Function call pruning
- 16:19Debug add-on for SQL analysis
- 20:13Optimizing SQL with DB tools
- 22:01Summary
related talks
18mApparently, you can "debug" your SQL queries
35mSlow database in your PHP stack? Don't blame the DBA!
54mBottleneck Analysis
53mBanishing Slow Queries with Intelligent Query Processing
32mTackling Slow Queries: A Practical Approach to Prevention and Correction
59mLessons Learned from the Trenches: Connectivity and Performance Tips&Tricks
52mThe SQL inside the ORM/Builder box | Claudio Zizza
47mDebugging active queries...
