Once again processing 11 million rows, now in seconds
stitcher.io·6h·
Discuss: Lobsters, r/webdev
🔍SQL
Preview
Report Post

Once again processing 11 million rows, now in seconds

Written on 2026-01-28

Two weeks ago I went on an optimization spree when a PHP script had to process 11 million database-stored events. My initial code processed around 30 events per second, which meant the whole operation would take around 4 days to complete. In my last post, I managed to get that number up to 50k events per second, resulting in only a couple of minutes of runtime.

I knew there was still room for improvement, though, and so, the journey began again.

Combined insert

This time I started with a much more acceptable baseline: 50k events per second. After reading my blogpost, Márk reached out to me telling me my visits per year projector could be imp…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help