Experimenting to optimize SQL query by x360 and some tips to read query plans
SQL is among the main skills for Ruby on Rails developers. When talking about performance, it's, for instance, critical to understand a query plan. When unsure, experimenting can sometimes go a long way, as this story of query optimization can tell.