Permalink
Browse files

ds: ability to disable the MYSQL and RAILS query caches during profiling

  • Loading branch information...
1 parent 5ab0dd7 commit f6b53e0745f6fbd5251951b51cfd4e891a24c3b3 @dsboulder dsboulder committed May 9, 2008
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/query_reviewer/mysql_adapter_extensions.rb
  2. +1 −0 query_reviewer_defaults.yml
@@ -41,7 +41,7 @@ def delete_with_review(sql, *args)
end
def select_with_review(sql, *args)
- sql.gsub!(/^SELECT /i, "SELECT SQL_NO_CACHE ")
+ sql.gsub!(/^SELECT /i, "SELECT SQL_NO_CACHE ") if QueryReviewer::CONFIGURATION["disable_sql_cache"]
@logger.silence { execute("SET PROFILING=1") } if QueryReviewer::CONFIGURATION["profiling"]
t1 = Time.now
query_results = select_without_review(sql, *args)
@@ -6,6 +6,7 @@ all:
profiling: enabled
production_data: true
max_safe_key_length: 100
+ disable_sql_cache: true
warn_severity: 3
critical_severity: 7

0 comments on commit f6b53e0

Please sign in to comment.