Roadmap 0.10, Performance roadmap — wave 3
PERF.45 Website: the test suites' cleanup DELETEs are the most expensive statements on the production server (1.3 s full scans of the biggest table)
performance_schema digests over 12 days: DELETE FROM session_activity WHERE query_string LIKE ? (bin/smoke-test.php:51) ran 174 times at 1.30 s each, 225 s in all, 129 M rows examined (a full scan of the biggest table per run; the next most expensive digest on the server is COMMIT at 178 s); DELETE FROM email_log WHERE to_email LIKE ? OR (template = ? AND body_text LIKE ?) 231 runs at 43 ms scanning a mediumtext (test-resources, test-owned, test-reply-drafts, test-bidding, test-a Discord member-api); DELETE FROM download_events WHERE referrer LIKE ? 174 runs; DELETE FROM form_throttle WHERE action LIKE ? OR action LIKE ? 433 runs. These run while visitors browse. Fix: capture MAX(id) when a test starts and delete WHERE id > ? AND … afterwards (the primary-key range makes it a 100-row scan), or stamp fixture rows with a fixed visitor_id prefix that idx_visitor covers; same for email_log and download_events.
Community comments
No comments yet
Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.
Sign in or create a free account to add a comment.