Do you think your SQL Query Is Fine?!
Lets today talk about the hidden cost of missing or wrong Database indexes in Rails.
A few years ago, I was investigating a Rails endpoint that suddenly became slow.
Nothing unusual had happened.
No major deployment.
No infrastructure changes.
No traffic spike.
The endpoint that normally responded in under 100ms was now taking several seconds.
The Rails logs looked clean.
The SQL query looked reasonable.
The application servers were healthy.
Read More