When investigating a slow Rails endpoint, it's common to start by looking for N+1 queries, missing indexes, or expensive joins. Sometimes, though, the real culprit is much smaller. It might be hiding in a method call you've written hundreds of times without thinking about it. In Rails, .count , .length , and .size all return a number, and many developers use them interchangeably. Under the hood, however, they behave very differently. Let's break down how each method works and see wh...