diff options
author | Xavier Noria <fxn@hashref.com> | 2012-02-03 16:06:50 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-02-03 16:12:18 -0800 |
commit | ee6e3c128b721570c8e59f507ea605cdd752cf7f (patch) | |
tree | 2f51f3516fed156b40598cbf495de7b987e5643d /activerecord/lib/active_record | |
parent | dd54137e82852ce3a62ce20ecc8550f1ca3a9f96 (diff) | |
download | rails-ee6e3c128b721570c8e59f507ea605cdd752cf7f.tar.gz rails-ee6e3c128b721570c8e59f507ea605cdd752cf7f.tar.bz2 rails-ee6e3c128b721570c8e59f507ea605cdd752cf7f.zip |
let automatic EXPLAIN ignore CACHE notifications
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/explain_subscriber.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/explain_subscriber.rb b/activerecord/lib/active_record/explain_subscriber.rb index fc76410499..1f8c4fc203 100644 --- a/activerecord/lib/active_record/explain_subscriber.rb +++ b/activerecord/lib/active_record/explain_subscriber.rb @@ -11,7 +11,10 @@ module ActiveRecord # SCHEMA queries cannot be EXPLAINed, also we do not want to run EXPLAIN on # our own EXPLAINs now matter how loopingly beautiful that would be. - IGNORED_PAYLOADS = %w(SCHEMA EXPLAIN) + # + # On the other hand, we want to monitor the performance of our real database + # queries, not the performance of the access to the query cache. + IGNORED_PAYLOADS = %w(SCHEMA EXPLAIN CACHE) def ignore_payload?(payload) payload[:exception] || IGNORED_PAYLOADS.include?(payload[:name]) end |