Today, I was reviewing some legacy code, trying to isolate the bottlenecks and pinpoint the optimisation strategies for scaling and performance optimisations of a rails app.
As the usual procedure, I wanted to check the database indexes and see if something was missing here. And my guess was in the