Brent 1/28/2026

Once again processing 11 million rows, now in seconds

Read Original

The article chronicles a performance optimization journey for a PHP script handling 11 million database events. Starting from 30 events per second, the author improved to 50k/sec, then doubled it to 100k/sec by batching INSERT queries. A further optimization involved moving count aggregation from MySQL's ON DUPLICATE KEY UPDATE to PHP, pre-calculating sums before a single bulk database operation, drastically reducing runtime.

Once again processing 11 million rows, now in seconds

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
Quoting Thariq Shihipar
Simon Willison 2 votes
2
Container queries are rad AF!
Chris Ferdinandi 1 votes
3
Top picks — 2026 January
Paweł Grzybek 1 votes
4
In Praise of –dry-run
Henrik Warne 1 votes
6
Vibe coding your first iOS app
William Denniss 1 votes