Ambitious_query_indexer is a project mainly written in ..., based on the MIT license.
Pain-free indexing to speed up your Rails app
h1. Ambitious Query Indexer
Ambitious Query Indexer is a Rails plugin to identify database indexes that are missing. Rather than looking at tables and guessing what needs indexing, it will locate and run as many queries as it can find and suggest indexes that could be added based upon its findings.
This plugin is still in beta; at the moment there are various queries that it doesn't understand and it could be better at finding methods in your application that run queries. That said, even now its recommendations should help your database load considerably.
I'm really eager for feedback on this plugin. If you have any thoughts or ideas, please let me know.
h2. Installation
@script/plugin install git://github.com/samdanavia/ambitious_query_indexer.git@
h3. Dependencies
This plugin uses the 'multi' gem. Install with:
@gem install multi@
h2. Usage
In the root of your Rails app, run the following:
@rake ambitious_query_indexer:analyze@
This plugin runs queries on your test database. Ensure that it is up-to-date ('rake db:migrate RAILS_ENV=test') and representative of your live schema for best results.
h2. Testing
Run the following from the root of your Rails app:
@rake test:plugins PLUGIN=ambitious_query_indexer@
_NB: This plugin's tests create tables in your test database. Any tables created will be prefixed with 'aqitest'. In the unlikely event that you have a table that follows this same convention, you may see it trashed in the test environment.
h2. Upcoming features/enhancements
h3. General
h3. SQL Optimisation
Enhancements to the SQL optimisation engine:
h3. Associations
h3. Object Call location
Enhancements to the code that deals with finding the methods that run queries:
h2. Feedback
All feedback, bug reports and thoughts on this gratefully received.
Copyright (c) 2009-10 Sam Phillips, released under the MIT license