Yes - here are a few helpful articles that I've referenced in the past:

https://tomafro.net/2009/08/using-indexes-in-rails-index-your-associations
https://tomafro.net/2009/08/using-indexes-in-rails-choosing-additional-indexes