Indexing
We’ve mentioned the well-known stereotype that “Rails doesn’t scale.” The reality is that, in many cases, those terrible, unfixable “Rails” issues are not due to Rails at all. Sometimes, they are the result of very junior engineers being able to bring businesses to life thanks to Rails’ simplicity: small, inexperienced teams can go from “zero to one”[19] empowered by Ruby on Rails. The catch is that despite all the power that Rails gives you, one can still make big mistakes when setting up the database. This will lead to performance issues; most of the time, the problem will be slow queries. If you find a slow query, the first step is to check the indexes that this query is hitting…or not hitting.
Understanding Indexes
Let’s start by ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access