Identifying slow Rails queries with sqlcommenter
08-Jul-2022 1211
In a large Rails application, it can be tricky to track down where a slow query is coming from in the app.Solutions to this problem have been steadily improving. First, we had the Marginalia gem, which adds comments to all your queries. This allows you to see which controller or job a query came from by reading your logs.As of Rails 7, Marginalia has become a native feature to Rails. No more gem needed. While this is a great improvement, we can still take our Rails query comments one step further.
Identifying slow Rails queries with sqlcommenter #ruby #rubydeveloper #rubyonrails #Identifying #Rails #queries #sqlcommenter #sqlcommenter https://rubyonrails.ba/link/identifying-slow-rails-queries-with-sqlcommenter