Adding Sidekiq Job Context to ActiveRecord Query Log Tags
18-Nov-2022 971
Anyone that has worked with Rails for any significant amount of time probably knows that Rails performance tends to be tightly coupled to database query performance. For this reason, it’s extremely valuable to make friends with your local slow query log, where you can identify the queries that are taking the longest and in need of tuning. So, once you’ve identified your slow query(ies), it’s time to get tuning, right? Not so fast. First you need to find out where in the code this query is being generated. If you’re doing things the Rails way and using ActiveRecord to generate these queries, that can be pretty tough since you can’t just grep the code to find that query.
Adding Sidekiq Job Context to ActiveRecord Query Log Tags #ruby #rubydeveloper #rubyonrails #Adding #Sidekiq #Context #ActiveRecord #Query #activerecord #sidekiq https://rubyonrails.ba/link/adding-sidekiq-job-context-to-activerecord-query-log-tags