Just Say No: Archives

Identifying missing indexes in your Rails App – Improvements to Ambitious Query Indexer

Sam Phillips, March 14th, 2010 2:42 pm

Last night, I took the opportunity of a free evening to add a few new features to Ambitious Query Indexer. My inspiration was a spot of welcome coverage from a few blogs, and also the changes that have been made to Elad Meidar’s RailsIndexes plugin. That project interests me a great deal because it is aimed at the same problem, but our implementations are quite different. There’s nothing wrong with a little friendly competition, and AQI was lacking a few features (especially around adding indexes for rails associations) that RailsIndexes had.

Ambitious Query Indexer can now:

  • Identify associations between ActiveRecord models, execute the queries used and show what indexes are required.
  • Automatically generate the ActiveRecord::Migration syntax, so it’s now really easy to translate the plugin’s output into an actual improvement in the application’s performance.
  • Move accurately parse the Ruby code, including no longer getting foxed by commented-out lines.
  • Identify optimisation candidates within the Model layer itself.

Of course, I also took the opportunity to tidy up some of the code and leave it in a better state than when I opened it up. As ever, I’m gagging for feedback – especially as this plugin is quite difficult to test. It’s working on every Rails app I can get my hands on at the moment – let me know if you have any issues and I’ll do my best to address them.

Tagged: Sam

No Comments

Leave a comment

Subscribe to this blog's RSS feed

On Twitter:

  1. Loading...

Follow me >

Previously Rejected:

  1. Identifying missing indexes in your Rails App – Improvements to Ambitious Query Indexer
  2. Installing Bundler, Rails and MySQL on OS X Snow Leopard
  3. Playing nicely: Notes on installing RVM + Passenger
  4. November In Manchester: Twitter As A Reality Show
  5. November In Manchester: Joining those technical dots
  6. Introducing Ambitious Query Indexer – A new way to index your Rails app’s database
  7. Top 5 Least Favourite Spotify Adverts
  8. Forget the technology – is the very idea of Twitter scalable?
  9. Going back to paper as a task collection system
  10. Update Facebook status from Twitter
  11. Staying out of trouble…
  12. ALA’s 2008 Survey
  13. Ten products that Apple just rendered obsolete with iPhone 3G/2.0
  14. Professional Accreditation for Web Professionals (Or, a rant on the British Computer Society)
  15. If it’s that important… pick up the phone!
  1. Bookmarks:

Valid XHTML 1.0 Transitional Valid CSS!