https://medium.com/@mera.stackhouse/what-are-indexes-and-how-to-add-them-to-your-rails-app-dc066d538771 What are indexes? And how to add them to your Rails app? When dealing with databases, the subject of indexing must inevitable come up. And with any rails app, you are most likely executing many searches that would benefit from indexes. When Should We Use Them? Before we get into what they are, we can identify some areas where they will be helpful. Some things we do a lot: Rendering show and edit views — Look up a user/article/post/student attributes by a string or foreign key Logging in — Find a user by their email/username Asking about associations — Look up a project’s owner (using a join table with something other than id’s or using polymorphic associations) All of the above procedures are going through your database row by row checking the value in the appropriate column until it comes across what it’s looking for. In SQL terms, we are looking at the portion of the query doing th...