<?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>maxgarrick.com &#187; softdelete</title>
	<atom:link href="http://maxgarrick.com/tag/softdelete/feed/" rel="self" type="application/rss+xml" />
	<link>http://maxgarrick.com</link>
	<description>Come take a look under the hood</description>
	<lastBuildDate>Sun, 08 Mar 2009 23:32:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Doctrine 1.0.4 Fixes SoftDelete</title>
		<link>http://maxgarrick.com/doctrine-104-fixes-softdelete/</link>
		<comments>http://maxgarrick.com/doctrine-104-fixes-softdelete/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 06:02:21 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[doctrine orm]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[softdelete]]></category>

		<guid isPermaLink="false">http://maxgarrick.com/?p=104</guid>
		<description><![CDATA[Just wanted to post an update to my previous blog entry about Doctrine ORM gotchas.  Since 1.0.4 was released, a seriously limiting bug was fixed in the SoftDelete template.  This bug was preventing typical performance optimizations that used LEFT JOINs to reduce the number of database queries.  The idea is that a [...]]]></description>
			<content:encoded><![CDATA[<p>Just wanted to post an update to my previous blog entry about Doctrine ORM gotchas.  Since 1.0.4 was released, a seriously limiting bug was fixed in the SoftDelete template.  This bug was preventing typical performance optimizations that used LEFT JOINs to reduce the number of database queries.  The idea is that a page generally loads much faster by executing few efficient JOIN&#8217;ed queries than many single-table queries (do your joins in MySQL, not PHP!)</p>
<p>I had posted a workaround to this bug ($query->addWhere(&#8221;deleted = 0 OR deleted IS NULL&#8221;) to all of your LEFT JOINs).  This was cumbersome and I felt violated the principle of the SoftDelete event listener.</p>
<p>With this bug resolved, I&#8217;ve been more freely adding custom finders for specific pages.  One page in particular (the MessageBoard thread index) went from 12 seconds to 4 seconds for a very large data set.  The number of DB queries also was cut from 1200+ to about 300.</p>
<p>Now I just have to get the page down to 10 queries and we can call it optimized.</p>
]]></content:encoded>
			<wfw:commentRss>http://maxgarrick.com/doctrine-104-fixes-softdelete/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
