Everyone Poops

September 10th, 2010

We all know that hitting the database as little as possible is one of the keys to improved performance. But rails can sometimes feel like a magic unicorn you don’t want to touch lest it fade into the mist.

Go ahead. Look that gift horse in the mouth. Even Unicorns poop and it’s all there in your development log.

Sorry for the poop comment. We’re potty training at my house.

But in keeping with the poop theme here, there’s a lot of valuable information in your output.

In episode 22, Ryan shows us eager loading. By using :include in your finders, you can squeeze multiple queries into one. So take a second look at those loops and check out that dot notation.

There are other ways of joining on tables, such as using :join. Which makes me wonder. Any other examples of ways to take advantage of eager loading?

Entry Filed under: Professional,Railscasts Project,Ruby on Rails

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Pages

Tweets

Meta