A gem to spy queries running with Active Record and report missing indexes
22-Apr-2021 1098
Imagine you have an application running in production and after a deploy, it starts to slow down.After a perhaps exhaustive debugging session, you may find that a new query or perhaps a change in the database schema was responsible for starting to have queries that do not use database indexes.Then, you create the appropriate index and the problem is solved!By using this gem, you can get those queries that are not using suitable database indexes in your test suite. So you won't have surprises like the example above, after a deploy.You can also enable the gem in your development/staging environment, generate a report and analyze if there is any missing index.
A gem to spy queries running with Active Record and report missing indexes #ruby #rubydeveloper #rubyonrails #queries #running #Active #Record #report #missing #indexes #active #gem #record https://rubyonrails.ba/link/a-gem-to-spy-queries-running-with-active-record-and-report-missing-indexes