<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Ruby on rails development tips</title>
	<atom:link href="http://blogs.smarteguru.com/ruby-on-rails/ruby-on-rails-development-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.smarteguru.com/ruby-on-rails/ruby-on-rails-development-tips/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 09 Mar 2010 10:08:35 +0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: List of Rails Tips</title>
		<link>http://blogs.smarteguru.com/ruby-on-rails/ruby-on-rails-development-tips/comment-page-1/#comment-54</link>
		<dc:creator>List of Rails Tips</dc:creator>
		<pubDate>Mon, 15 Sep 2008 18:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smarteguru.com/?p=203#comment-54</guid>
		<description>[...] An interesting list of Rails tips to wander through. [...]</description>
		<content:encoded><![CDATA[<p>[...] An interesting list of Rails tips to wander through. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rick</title>
		<link>http://blogs.smarteguru.com/ruby-on-rails/ruby-on-rails-development-tips/comment-page-1/#comment-48</link>
		<dc:creator>rick</dc:creator>
		<pubDate>Sun, 14 Sep 2008 14:12:15 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smarteguru.com/?p=203#comment-48</guid>
		<description>Have you done benchmarks to prove that dynamic finders (like find_by_*) are really that much slower?  ActiveRecord generates the method in method_missing once, and then after that it&#039;s like calling a regular method.

But I suppose if that kind of speed is really necessary for you, you could change this:

Person.find_by_sql(”SELECT person.height WHERE person.name = ‘JoeyJoeJoe’”)

to:

connection.select_value &quot;SELECT person.height WHERE person.name = ‘JoeyJoeJoe’”

AR::Base.find_by_sql will instantiate a model, even for your single field.

I&#039;m a little curious about your comment on dev boxes being faster than production boxes.  In my experience (with engine yard at least), it&#039;s the complete opposite.  However, queries with hundreds of thousands of rows are definitely much slower than my local tables with just 5.  But I&#039;ve found that apps with indexed tables, as you suggest, spend more time rendering the view than fetching from the database.</description>
		<content:encoded><![CDATA[<p>Have you done benchmarks to prove that dynamic finders (like find_by_*) are really that much slower?  ActiveRecord generates the method in method_missing once, and then after that it&#8217;s like calling a regular method.</p>
<p>But I suppose if that kind of speed is really necessary for you, you could change this:</p>
<p>Person.find_by_sql(”SELECT person.height WHERE person.name = ‘JoeyJoeJoe’”)</p>
<p>to:</p>
<p>connection.select_value &#8220;SELECT person.height WHERE person.name = ‘JoeyJoeJoe’”</p>
<p>AR::Base.find_by_sql will instantiate a model, even for your single field.</p>
<p>I&#8217;m a little curious about your comment on dev boxes being faster than production boxes.  In my experience (with engine yard at least), it&#8217;s the complete opposite.  However, queries with hundreds of thousands of rows are definitely much slower than my local tables with just 5.  But I&#8217;ve found that apps with indexed tables, as you suggest, spend more time rendering the view than fetching from the database.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
