Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Just like the query_analyzer plugin, but logs to the db instead of the log file
Ruby
tree: 8836d7eb43

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
benchmarks
generators/enhanced_query_analyzer
lib
spec
.gitignore
GPL_LICENSE
MIT_LICENSE
README
Rakefile
TODO
init.rb

README

= Enhanced Query Analyzer Plugin for MySQL on Rails


= Installation

Install it in vendor/plugins:

  <braid add / git clone / git submodule> \
    git://github.com/smtlaissezfaire/enhanced_query_analyzer.git \
    vendor/plugins/enhanced_query_analyzer

  Add the model and migration:

    ./script/generate enhanced_query_plugin

  Migrate:

    rake db:migrate

= Usage

  All select queries will be logged to the query_logs table.  You now have the ability to
  store historical data of all of your database access.

  You can turn off all query logging by putting the following in environment.rb:

      EnhancedQueryAnalyzer.logging = false

  You can also add the ability to dynamically run and log the explain of each query:

      EnhancedQueryAnalyzer.explain_logging = true

= Running Unit Tests

  You'll need rspec and mysql.  The database must be named 'query_analyzer_test'

= Credits

  Written by Scott Taylor <scott@railsnewbie.com>.
  Sponsored by Eastmedia (http://eastmedia.com/).

= License

Dual licensed under the MIT & GPL licenses.
Something went wrong with that request. Please try again.