<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tech Trivia &#187; database</title>
	<atom:link href="http://www.alethe.com/brad/tag/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alethe.com/brad</link>
	<description>For those who know just enough to be dangerous</description>
	<lastBuildDate>Sun, 28 Feb 2010 04:45:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Reduce database connections using :include</title>
		<link>http://www.alethe.com/brad/2008/04/reduce-database-connections-using-include/</link>
		<comments>http://www.alethe.com/brad/2008/04/reduce-database-connections-using-include/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 01:41:19 +0000</pubDate>
		<dc:creator>Brad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby and Rails]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.alethe.com/brad/?p=36</guid>
		<description><![CDATA[When displaying a list that requires information from several tables in the database, you can sometimes end up with three or more database queries per list row. Depending on the situation, this may not be a problem. However, it is possible to join the tables in one large SQL query using the :include option. # [...]]]></description>
			<content:encoded><![CDATA[<p>When displaying a list that requires information from several tables in the database, you can sometimes end up with three or more database queries per list row.  Depending on the situation, this may not be a problem.  However, it is possible to join the tables in one large SQL query using the <code>:include</code> option.</p>
<pre class="brush: ruby">
# :include example
#
@requests = Request.find(:all, :include =&gt; [:department, :status])
</pre>
<p>Using the <code>:include</code> option may improve performance.  However, it will likely use more server memory and could potentially return a lot of data through the joins that may not even be used.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alethe.com/brad/2008/04/reduce-database-connections-using-include/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
