-
Recent Posts
Recent Comments
- Mac OS X color showing ESC[whatever for git-diff colors (and more) (12)
- Gopala Krishna A: Thanks a lot!! This really proved helpful on opensuse 11.2
- Silly Avatar: Thanx for this blog entry. Was having this problem while ssh-ing to a linux vps w/Putty. Thought it was...
- Girish KS: Thanks for the post Nate and thanks pablitostar for your suggestion. I started using git few days back and...
- pablitostar: I found using the -r flag did fix git-diff, but it broke something else in less. Specifically, searching...
- Gopala Krishna A: Thanks a lot!! This really proved helpful on opensuse 11.2
- ActiveRecord from_xml (and from_json) part 2 (3)
- Billy Kimble: Thanks for the snippet of code — it has helped me out tremendously. Unfortunately it did not work...
- Mac OS X color showing ESC[whatever for git-diff colors (and more) (12)
Categories
- bookmarks (2)
- cascading (2)
- code (2)
- deployment (6)
- ec2 (3)
- erlang (2)
- gems (3)
- git (7)
- hadoop (3)
- java (1)
- merb (1)
- music (1)
- osx (2)
- poolparty (3)
- processing (1)
- programming (43)
- rails (11)
- ruby (21)
- scalability (5)
- shell (8)
- sysadmin (16)
- tips (13)
- Uncategorized (3)
- useless (1)
Archives
Pages
Blogroll
Monthly Archives: April 2008
Chaining :include’s in Rails to reduce the number of SQL queries
Say you have the following data model
and you want to execute a single query that returns all the data at once within the ActiveRecord tables, with the proper rails associations between them. Wouldn’t it be nice if you could do something like
A.find(:all, :include => :b => :c => :d => :e) #v1
? Though this is [...]
Posted in programming, rails, scalability Tagged ActiveRecord, include, join, joins, optimize, rails, ruby on rails, sql Leave a comment
the symlink trick
Courtenay writes on scaling rails applications at Caboo.se. He says:
Take a look at your logs: are you performing over 10 database calls per request? You need to fix this. Are you performing over 90? You’re a dumba**.
Today viewed the logs of a rails application I am writing. To calculate one particular page [...]
Posted in deployment, rails, scalability 2 Comments

Fix for “sslv3 alert handshake failure (OpenSSL::SSL::SSLError)”