Re:Never use MongoDB (2013)
by luhn on Monday February 01, 2021 @03:27PM
(#25993379)
Author is using Rails, so my guess would be the bottleneck is ActiveRecord. I've never used ActiveRecord, so I can't speak to it directly, but in my experience when dealing with large numbers of records in an ORM (and author easily is working with hundreds of thousands), things grind to a halt, even with eager loading. There's a lot more overhead to create thousands of ORM objects than it is to serialize an equivalent chunk of BSON.
[ Parent
| on HN ]
Bulk operations are were a lot of rails programmers struggle.
Active record is awesome in many ways, but it can shoehorn you into n+1 solutions.
12k is not a large number of records though