<?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>Pramatr Blog &#187; SQL</title>
	<atom:link href="http://www.pramatr.com/blog/category/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pramatr.com/blog</link>
	<description>A collection of articles from pramatr.com on technology, security, software and anything we find interesting</description>
	<lastBuildDate>Mon, 29 Mar 2010 19:48:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Embedded Database Performance: Handle With Care</title>
		<link>http://www.pramatr.com/blog/2009/02/10/embedded-database-performance-handle-with-car/</link>
		<comments>http://www.pramatr.com/blog/2009/02/10/embedded-database-performance-handle-with-car/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 06:00:38 +0000</pubDate>
		<dc:creator>pramatr</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Connection Pool]]></category>
		<category><![CDATA[Improvement]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Jdbc]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Smells]]></category>

		<guid isPermaLink="false">http://pramatr.com/?p=11</guid>
		<description><![CDATA[Embedded databases are proving pretty popular with many teams finding their usage extremely appealing. Many embedded databases have impressive features; easy to integrate into the software, low administration requirements, very low footprint and generally extremely fast. It is for this last reason that some people look to these databases, but it is also for this reason [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Embedded_database">Embedded databases</a> are proving pretty popular with many teams finding their usage extremely appealing. Many embedded databases have impressive features; easy to integrate into the software, low administration requirements, very low footprint and generally extremely fast. It is for this last reason that some people look to these databases, but it is also for this reason that they need to be handled with care.</p>
<p>Just <a href="http://hsqldb.org/web/openoffice.html">like</a> OpenOffice, a previous project I worked on used an embedded version of <a href="http://hsqldb.org/">HSQLDB</a>. We had started to have several performance problems so engaged in some profiling to find potential areas for improvement. After staring at several screens full of SQL debug, one thing became apparent; our system was producing a huge number of SQL statements. This was accompanied by the realisation that it was also producing a huge number of exactly the same SQL statements.</p>
<p>As the embedded database was extremely fast, there had never been any performance problems before. In fact the database was not the bottleneck in many of the application operations. As the application grew more complex however, performance problems began to arise quite quickly. These problems only got worse when the numbers started to increase. Complexity + Scaling != Success. The extemely fast embedded database was now starting to be a real problem, some serious changes needed to be made.</p>
<p>Many of the database performance problems were resolved quite quickly by simply re-learning the most basic best practices, just because the embedded database was quick these should not have been ignored;</p>
<ul>
<li>Connection pooling can improve performance</li>
<li>Statement caching can improve performance</li>
<li>Batching statements can improve performance</li>
<li>Performing <a href="http://pramatr.com/2009/02/05/sql-n-1-selects-explained/">SQL n + 1 selects</a> are a bad idea regardless of how quick the database is</li>
<li>Caching common SQL results can improve performance</li>
<li>The database needs to be profiled to see exactly what SQL is getting executed against it</li>
</ul>
<p>It may be possible to ignore these issues early in the project, but as the complexity increases and the application is expected to scale they can begin to be exposed. Embedded databases performance can be impressive, but make sure you handle with care.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pramatr.com/blog/2009/02/10/embedded-database-performance-handle-with-car/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQL n + 1 Selects Explained</title>
		<link>http://www.pramatr.com/blog/2009/02/05/sql-n-1-selects-explained/</link>
		<comments>http://www.pramatr.com/blog/2009/02/05/sql-n-1-selects-explained/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 06:00:47 +0000</pubDate>
		<dc:creator>pramatr</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Code Review]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Improvement]]></category>
		<category><![CDATA[Jdbc]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Smells]]></category>

		<guid isPermaLink="false">http://pramatr.com/?p=426</guid>
		<description><![CDATA[The SQL n + 1 selects problem is extremely common but I have often found that many people have either never heard of it or simply don&#8217;t understand it. It is actually very easy to introduce a problem like this into your code, but it&#8217;s also very easy to resolve as well. Problems like this [...]]]></description>
			<content:encoded><![CDATA[<p>The SQL n + 1 selects problem is extremely common but I have often found that many people have either never heard of it or simply don&#8217;t understand it. It is actually very easy to introduce a problem like this into your code, but it&#8217;s also very easy to resolve as well. Problems like this are best explained with an example; so imagine we have a table called users and another called user_roles. These tables are setup with a one-to-many relationship, meaning that one user (e.g. jsmith) can have many roles (e.g. Administrator, Auditor, Developer). Many people might implement something like this;</p>
<blockquote>
<pre><span style="font-size:small;"><strong>public</strong> <span style="color:#2040a0;">Iterable</span><span style="color:#4444ff;">&lt;</span><span style="color:#2040a0;">User</span><span style="color:#4444ff;">&gt;</span> <span style="color:#2040a0;">allUsers</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span> <span style="color:#4444ff;"><strong>{</strong></span>
    <strong>final</strong> <span style="color:#2040a0;">String</span> <span style="color:#2040a0;">selectUsers</span> <span style="color:#4444ff;">=</span> <span style="color:#008000;">"select users.username, users.email, " +</span>
        <span style="color:#008000;">"users.last_password_change from users"</span><span style="color:#4444ff;">;</span>
    <strong>return</strong> <span style="color:#2040a0;">getJdbcTemplate</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span>.<span style="color:#2040a0;">query</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">selectUsers</span>, <strong>new</strong> <span style="color:#2040a0;">Object</span><span style="color:#4444ff;"><strong>[</strong></span><span style="color:#4444ff;"><strong>]</strong></span> <span style="color:#4444ff;"><strong>{</strong></span><span style="color:#4444ff;"><strong>}</strong></span>,
                <strong>new</strong> <span style="color:#2040a0;">ParameterizedRowMapper</span><span style="color:#4444ff;">&lt;</span><span style="color:#2040a0;">User</span><span style="color:#4444ff;">&gt;</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span> <span style="color:#4444ff;"><strong>{</strong></span>
        <strong>public</strong> <span style="color:#2040a0;">User</span> <span style="color:#2040a0;">mapRow</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">ResultSet</span> <span style="color:#2040a0;">resultSet</span>, <strong>int</strong> <span style="color:#2040a0;">rowNumber</span><span style="color:#4444ff;"><strong>)</strong></span> <strong>throws</strong> <span style="color:#2040a0;">SQLException</span> <span style="color:#4444ff;"><strong>{</strong></span>
            <span style="color:#2040a0;">String</span> <span style="color:#2040a0;">username</span> <span style="color:#4444ff;">=</span> <span style="color:#2040a0;">resultSet</span>.<span style="color:#2040a0;">getString</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#008000;">"username"</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <span style="color:#2040a0;">String</span> <span style="color:#2040a0;">email</span> <span style="color:#4444ff;">=</span> <span style="color:#2040a0;">resultSet</span>.<span style="color:#2040a0;">getString</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#008000;">"email"</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <span style="color:#2040a0;">Date</span> <span style="color:#2040a0;">lastPasswordChange</span> <span style="color:#4444ff;">=</span> <span style="color:#2040a0;">resultSet</span>.<span style="color:#2040a0;">getDate</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#008000;">"last_password_change"</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <span style="color:#2040a0;">User</span> <span style="color:#2040a0;">user</span> <span style="color:#4444ff;">=</span> <strong>new</strong> <span style="color:#2040a0;">DefaultUser</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">username</span>, <span style="color:#2040a0;">email</span>, <span style="color:#2040a0;">lastPasswordChange</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <span style="color:#2040a0;">addRolesToUser</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">user</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <strong>return</strong> <span style="color:#2040a0;">user</span><span style="color:#4444ff;">;</span>
        <span style="color:#4444ff;"><strong>}</strong></span>
    <span style="color:#4444ff;"><strong>}</strong></span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
<span style="color:#4444ff;"><strong>}</strong></span>

<strong>private</strong> <strong>void</strong> <span style="color:#2040a0;">addRolesToUser</span><span style="color:#4444ff;"><strong>(</strong></span><strong>final</strong> <span style="color:#2040a0;">User</span> <span style="color:#2040a0;">user</span><span style="color:#4444ff;"><strong>)</strong></span> <span style="color:#4444ff;"><strong>{</strong></span>
    <strong>final</strong> <span style="color:#2040a0;">String</span> <span style="color:#2040a0;">selectUserRoles</span> <span style="color:#4444ff;">=</span> <span style="color:#008000;">"select role_name from user_roles where username = ?"</span><span style="color:#4444ff;">;</span>
    <span style="color:#2040a0;">getJdbcTemplate</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span>.<span style="color:#2040a0;">query</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">selectUserRoles</span>, <strong>new</strong> <span style="color:#2040a0;">Object</span><span style="color:#4444ff;"><strong>[</strong></span><span style="color:#4444ff;"><strong>]</strong></span> <span style="color:#4444ff;"><strong>{</strong></span> <span style="color:#2040a0;">user</span>.<span style="color:#2040a0;">getPrincipalName</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span> <span style="color:#4444ff;"><strong>}</strong></span>,
                <strong>new</strong> <span style="color:#2040a0;">RowCallbackHandler</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span> <span style="color:#4444ff;"><strong>{</strong></span>
        <strong>public</strong> <strong>void</strong> <span style="color:#2040a0;">processRow</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">ResultSet</span> <span style="color:#2040a0;">resultSet</span><span style="color:#4444ff;"><strong>)</strong></span> <strong>throws</strong> <span style="color:#2040a0;">SQLException</span> <span style="color:#4444ff;"><strong>{</strong></span>
            <span style="color:#2040a0;">String</span> <span style="color:#2040a0;">rolename</span> <span style="color:#4444ff;">=</span> <span style="color:#2040a0;">resultSet</span>.<span style="color:#2040a0;">getString</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#008000;">"role_name"</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <span style="color:#2040a0;">user</span>.<span style="color:#2040a0;">addRole</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">rolename</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
        <span style="color:#4444ff;"><strong>}</strong></span>
    <span style="color:#4444ff;"><strong>}</strong></span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
<span style="color:#4444ff;"><strong>}</strong></span></span></pre>
</blockquote>
<p>Reviewing the code we can see one query is executed to retrieve the users, the problem here is for each user another SQL statement needs to be executed to retrieve the roles. If the first query retrieved one user, this would require one additional query to retrieve the roles. If the first query retrieved a hundred users, this would require one hundred additional queries to retrieve the roles. The pattern will always be the same, one query for the users and n queries dependent on the number of users found, thus n + 1. Although this solution is functional, it does result in many unnecessary SQL statements being executed.</p>
<blockquote>
<pre><span style="font-size:small;"><strong>select</strong> users.username, users.email, users.last_password_change <strong>from</strong> users;
<strong>select</strong> role_name <strong>from</strong> user_roles <strong>where</strong> username = ?;
<strong>select</strong> role_name <strong>from</strong> user_roles <strong>where</strong> username = ?;
<strong>select</strong> role_name <strong>from</strong> user_roles <strong>where</strong> username = ?;
...</span></pre>
</blockquote>
<p>Shared resources are typically the bottleneck in most applications, so expensive or unnecessary SQL should be avoided if possible. As the application attempts to scale, this bottleneck can become extremely problematic and severely inhibit application performance. Fortunately this is a simple solutions to this problem; introducing a join into the query.</p>
<blockquote>
<pre><span style="font-size:small;"><strong>public</strong> <span style="color:#2040a0;">Iterable</span><span style="color:#4444ff;">&lt;</span><span style="color:#2040a0;">User</span><span style="color:#4444ff;">&gt;</span> <span style="color:#2040a0;">allUsers</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span> <span style="color:#4444ff;"><strong>{</strong></span>
    <strong>final</strong> <span style="color:#2040a0;">String</span> <span style="color:#2040a0;">selectUsers</span> <span style="color:#4444ff;">=</span>
        <span style="color:#008000;">"select users.username, users.email, users.last_password_change, user_roles.role_name "</span>
            <span style="color:#4444ff;">+</span> <span style="color:#008000;">"from users left join user_roles on (users.username = user_roles.username)"</span><span style="color:#4444ff;">;</span>
    <strong>final</strong> <span style="color:#2040a0;">Map</span><span style="color:#4444ff;">&lt;</span><span style="color:#2040a0;">String</span>, <span style="color:#2040a0;">User</span><span style="color:#4444ff;">&gt;</span> <span style="color:#2040a0;">users</span> <span style="color:#4444ff;">=</span> <strong>new</strong> <span style="color:#2040a0;">HashMap</span><span style="color:#4444ff;">&lt;</span><span style="color:#2040a0;">String</span>, <span style="color:#2040a0;">User</span><span style="color:#4444ff;">&gt;</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
    <span style="color:#2040a0;">getJdbcTemplate</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span>.<span style="color:#2040a0;">query</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">selectUsers</span>, <strong>new</strong> <span style="color:#2040a0;">Object</span><span style="color:#4444ff;"><strong>[</strong></span><span style="color:#4444ff;"><strong>]</strong></span> <span style="color:#4444ff;"><strong>{</strong></span><span style="color:#4444ff;"><strong>}</strong></span>, <strong>new</strong> <span style="color:#2040a0;">RowCallbackHandler</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span> <span style="color:#4444ff;"><strong>{</strong></span>
        <strong>public</strong> <strong>void</strong> <span style="color:#2040a0;">processRow</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">ResultSet</span> <span style="color:#2040a0;">resultSet</span><span style="color:#4444ff;"><strong>)</strong></span> <strong>throws</strong> <span style="color:#2040a0;">SQLException</span> <span style="color:#4444ff;"><strong>{</strong></span>
            <span style="color:#2040a0;">String</span> <span style="color:#2040a0;">username</span> <span style="color:#4444ff;">=</span> <span style="color:#2040a0;">resultSet</span>.<span style="color:#2040a0;">getString</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#008000;">"username"</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <strong>if</strong> <span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;">!</span><span style="color:#2040a0;">users</span>.<span style="color:#2040a0;">containsKey</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">username</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;"><strong>)</strong></span> <span style="color:#4444ff;"><strong>{</strong></span>
                <span style="color:#2040a0;">String</span> <span style="color:#2040a0;">email</span> <span style="color:#4444ff;">=</span> <span style="color:#2040a0;">resultSet</span>.<span style="color:#2040a0;">getString</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#008000;">"email"</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
                <span style="color:#2040a0;">Date</span> <span style="color:#2040a0;">lastPasswordChange</span> <span style="color:#4444ff;">=</span> <span style="color:#2040a0;">resultSet</span>.<span style="color:#2040a0;">getDate</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#008000;">"last_password_change"</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
                <span style="color:#2040a0;">User</span> <span style="color:#2040a0;">user</span> <span style="color:#4444ff;">=</span> <strong>new</strong> <span style="color:#2040a0;">DefaultUser</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">username</span>, <span style="color:#2040a0;">email</span>, <span style="color:#2040a0;">lastPasswordChange</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
                <span style="color:#2040a0;">users</span>.<span style="color:#2040a0;">put</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">username</span>, <span style="color:#2040a0;">user</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <span style="color:#4444ff;"><strong>}</strong></span>

            <span style="color:#2040a0;">String</span> <span style="color:#2040a0;">rolename</span> <span style="color:#4444ff;">=</span> <span style="color:#2040a0;">resultSet</span>.<span style="color:#2040a0;">getString</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#008000;">"role_name"</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <strong>if</strong> <span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;">!</span><span style="color:#2040a0;">StringUtil</span>.<span style="color:#2040a0;">isNull</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">rolename</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;"><strong>)</strong></span> <span style="color:#4444ff;"><strong>{</strong></span>
                <span style="color:#2040a0;">User</span> <span style="color:#2040a0;">user</span> <span style="color:#4444ff;">=</span> <span style="color:#2040a0;">users</span>.<span style="color:#2040a0;">get</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">username</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
                <span style="color:#2040a0;">user</span>.<span style="color:#2040a0;">addRole</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#2040a0;">rolename</span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
            <span style="color:#4444ff;"><strong>}</strong></span>
        <span style="color:#4444ff;"><strong>}</strong></span>
    <span style="color:#4444ff;"><strong>}</strong></span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
    <strong>return</strong> <span style="color:#2040a0;">users</span>.<span style="color:#2040a0;">values</span><span style="color:#4444ff;"><strong>(</strong></span><span style="color:#4444ff;"><strong>)</strong></span><span style="color:#4444ff;">;</span>
<span style="color:#4444ff;"><strong>}</strong></span></span></pre>
</blockquote>
<p>Although the code and SQL statement are slightly more complex that the original example, it results in much fewer SQL statements being executed. Instead of the n + 1 statements executed in the first example, one statement is executed that fetches all the required data. This typically results in much improved performance and as the numbers scale the improvement in performance can become much more apparent.</p>
<blockquote>
<pre><span style="font-size:small;"><strong>select</strong> users.username, users.email, users.last_password_change, user_roles.role_name
    <strong>from</strong> users left join user_roles <strong>on</strong> <strong>(</strong>users.username = user_roles.username);</span></pre>
</blockquote>
<p>As with all performance optimizations the most important thing is to measure the effect of the improvement. Performance optimizations aren&#8217;t always predictable so by taking measurements before and after the change, you can accurately know if you have actually improved the performance (or made it worse). A SQL join may be the most appropriate way of solving a problem such as this, but there are other alternatives such as <a href="http://ehcache.sourceforge.net/">caching</a> the data instead. Although the SQL n + 1 selects is an extremely common problem, is not always well understood and is often still found within code. It is very easy to introduce a problem like this into your code, but it&#8217;s also very easy to resolve as well. Next time you are viewing your debug output, see if you can spot SQL n + 1 selects.</p>
<p><strong>References</strong></p>
<p>Database access using <a href="http://pramatr.com/2008/08/19/spring-jdbctemplate-the-phantom-performance-problem/">Spring JdbcTemplate</a><br />
Preventing the n + 1 select problem when using <a href="http://www.hibernate.org/hib_docs/v3/reference/en-US/html/performance.html#performance-fetching-custom">Hibernate</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pramatr.com/blog/2009/02/05/sql-n-1-selects-explained/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
