While working in the deals application at LivingSocial and using Rails 2.3, or any project for that matter it became extremely difficult for me to see the queries that a single page load generated.
We have all seen it, requests contain information like the paramaters posted, the controller loading, the assets loading, the memcache reads. It got to the point that one page load (without memcache on) would literally overflow my buffer and not even let me even begin to see what queries were being generated on a page load.
I knew there had to be a better way so i did some digging and discovered this line that should be placed in config/environments/development.rb:
Now all you have to do in a separate terminal window is tail the logs of this file:And you can easily see all the queries being generated!