Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created March 31, 2011 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahoward/897418 to your computer and use it in GitHub Desktop.
Save ahoward/897418 to your computer and use it in GitHub Desktop.
:~/rails_app $ rails c 2>sql.out
Loading development environment (Rails 3.0.3)
ruby-1.8.7-p330 :001 > User.first
=> #<User id: 0, uuid: "a235a4ca-5018-11e0-ab27-78ca39fffe37", email: "rails_app@rails_app.com", password: nil, handle: "rails_app", created_at: "2011-03-16 21:59:15", updated_at: "2011-03-16 21:59:15">
ruby-1.8.7-p330 :002 > User.count
=> 1
ruby-1.8.7-p330 :003 > exit
:~/rails_app $ cat sql.out
SQL (0.3ms) SHOW client_min_messages
SQL (0.1ms) SET client_min_messages TO 'panic'
SQL (0.1ms) SET standard_conforming_strings = on
SQL (0.0ms) SET client_min_messages TO 'notice'
SQL (0.3ms) SET time zone 'UTC'
SQL (0.1ms) SHOW TIME ZONE
User Load (1.4ms) SELECT "users".* FROM "users" LIMIT 1
SQL (40.0ms) SELECT COUNT(*) FROM "users"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment