Pages tagged scrooge:

ActiveRecord Optimization with Scrooge - igvita.com
http://www.igvita.com/2009/02/27/activerecord-optimization-with-scrooge/

Plugin that monitors the fields you're actually using from queries you make and over time dynamically adjusts your queries to retrieve only the fields you need. Apparently includes some magic to go re-query for more fields if you attempt to use one you hadn't loaded in the trimmed query. Amazing-looking stuff, though since we're currently using a DB on the same machine, transferring lots of extra data isn't nearly as expensive.
Dynamic query optimization is a hotbed of research in the database industry. Each and every query you execute goes through a rigorous optimization phase which tries to squeeze every last bit of performance: deciding which indexes to use, the execution order and sort order to minimize the number in-memory tables, etc. However, one thing the database has no access to is the application layer knowledge of which data the user is actually using after it is retrieved. Often times, the query fetches all of the columns when only a few are required, which is exactly the pattern that Lourens Naudé is seeking to optimize with his new plugin: scrooge.
Dynamic Query Optimization