Scrooge: An Automatic Database Query Optimizer
Scrooge (or Github repository) is a "dynamic query optimizer" (created by Lourens Naudé) that's framework and ORM agnostic but, naturally, will probably find its biggest market in Ruby land with Rails developers. To this end, Ilya Grigorik has put together an explanatory article, ActiveRecord Optimization with Scrooge.
In short, you can install Scrooge as a plugin, and from that point it'll unobtrusively monitor the database queries made by your app, along with which attributes are used from the data returned. Monitoring this over time allows Scrooge to establish which attributes are actually being used (or, more importantly, those that are definitely not) and it can then automatically change the queries in future to be as lean as possible. Currently Scrooge is well tested on Rails 2.3, though it is also known to work on 2.2.2. Ruby 1.9.1 support is pending.
You can learn a lot more about Scrooge's operation from the rather detailed documentation on the Github page.