<?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: Double-thinking in SQL</title>
	<atom:link href="http://explainextended.com/2009/07/12/double-thinking-in-sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/</link>
	<description>How to create fast database queries</description>
	<lastBuildDate>Fri, 02 Jul 2010 07:37:06 +0400</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Paul Horan</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-84</link>
		<dc:creator>Paul Horan</dc:creator>
		<pubDate>Wed, 23 Sep 2009 03:41:41 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-84</guid>
		<description>Why anyone continues to bother with MySQL (for anything beyond storing your golf scores or pumpkin pie recipes) is beyond me...   Yes, it&#039;s free, but in the end, you get exactly what you pay for!  Continue to struggle with that TOY, or invest a few bucks in an enterprise-class DBMS. 
Sybase SQLAnywhere.</description>
		<content:encoded><![CDATA[<p>Why anyone continues to bother with MySQL (for anything beyond storing your golf scores or pumpkin pie recipes) is beyond me&#8230;   Yes, it&#8217;s free, but in the end, you get exactly what you pay for!  Continue to struggle with that TOY, or invest a few bucks in an enterprise-class DBMS.<br />
Sybase SQLAnywhere.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordan</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-83</link>
		<dc:creator>Jordan</dc:creator>
		<pubDate>Tue, 22 Sep 2009 21:26:31 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-83</guid>
		<description>Great article! Thank you.</description>
		<content:encoded><![CDATA[<p>Great article! Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quassnoi</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-82</link>
		<dc:creator>Quassnoi</dc:creator>
		<pubDate>Tue, 22 Sep 2009 06:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-82</guid>
		<description>@artscr: and one thing more that matters is that every system is programmed with a set of predefined algorithms and the query optimizers just have to build a Lego castle out of them.

MySQL, for instance, mow, in 2009, is not capable of doing HASH JOINs and MERGE JOINs (which I think were invented by Leonardo da Vinci or about that time). That means that for certain tasks you will never have decent performance, period.

And no engine allows adding algorithms into the query plan.</description>
		<content:encoded><![CDATA[<p>@artscr: and one thing more that matters is that every system is programmed with a set of predefined algorithms and the query optimizers just have to build a Lego castle out of them.</p>
<p>MySQL, for instance, mow, in 2009, is not capable of doing HASH JOINs and MERGE JOINs (which I think were invented by Leonardo da Vinci or about that time). That means that for certain tasks you will never have decent performance, period.</p>
<p>And no engine allows adding algorithms into the query plan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quassnoi</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-81</link>
		<dc:creator>Quassnoi</dc:creator>
		<pubDate>Tue, 22 Sep 2009 05:56:37 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-81</guid>
		<description>@artsrc: if by &quot;really slow&quot; query execution you mean good algorithms badly implemented, then yes, sometimes it is really a problem with free engines like PostgreSQL and MySQL.

For instance, this article: http://explainextended.com/2009/09/18/not-in-vs-not-exists-vs-left-join-is-null-mysql/ shows same algorithm reimplemented three times in MySQL, one of implementations being less efficient.

SQL Server and Oracle are less prone to this, that is if they came up with a good algorithm, that means it will be as fast as possible. The problem is usually with the algorithm chosen (i. e. the query plan), not with its implementation.

Game gevelopers is a good analogy. However, inserting assembly pieces into code makes your code faster, while inserting custom functions sometimes make it slower, especially in Oracle (googling for &quot;oracle context switch&quot; will show you lots of gory details).</description>
		<content:encoded><![CDATA[<p>@artsrc: if by &#8220;really slow&#8221; query execution you mean good algorithms badly implemented, then yes, sometimes it is really a problem with free engines like PostgreSQL and MySQL.</p>
<p>For instance, this article: <a href="http://explainextended.com/2009/09/18/not-in-vs-not-exists-vs-left-join-is-null-mysql/" rel="nofollow">http://explainextended.com/2009/09/18/not-in-vs-not-exists-vs-left-join-is-null-mysql/</a> shows same algorithm reimplemented three times in MySQL, one of implementations being less efficient.</p>
<p>SQL Server and Oracle are less prone to this, that is if they came up with a good algorithm, that means it will be as fast as possible. The problem is usually with the algorithm chosen (i. e. the query plan), not with its implementation.</p>
<p>Game gevelopers is a good analogy. However, inserting assembly pieces into code makes your code faster, while inserting custom functions sometimes make it slower, especially in Oracle (googling for &#8220;oracle context switch&#8221; will show you lots of gory details).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Coddington</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-80</link>
		<dc:creator>Adam Coddington</dc:creator>
		<pubDate>Tue, 22 Sep 2009 05:50:01 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-80</guid>
		<description>Insightful article.

I had myself ran into many situations during which the SQL engine decided upon absurdly inefficient methods at pulling things off-- many-to-many joins are one potentially painful example.</description>
		<content:encoded><![CDATA[<p>Insightful article.</p>
<p>I had myself ran into many situations during which the SQL engine decided upon absurdly inefficient methods at pulling things off&#8211; many-to-many joins are one potentially painful example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: artsrc</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-79</link>
		<dc:creator>artsrc</dc:creator>
		<pubDate>Tue, 22 Sep 2009 01:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-79</guid>
		<description>How much of the difference in behavior (show plan versus don&#039;t care) is due to the declarative model, and how much is due to the fact that query execution is really slow.

Are games programmers who are running into performance issues are doing the same as SQL developers?</description>
		<content:encoded><![CDATA[<p>How much of the difference in behavior (show plan versus don&#8217;t care) is due to the declarative model, and how much is due to the fact that query execution is really slow.</p>
<p>Are games programmers who are running into performance issues are doing the same as SQL developers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-45</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Tue, 01 Sep 2009 09:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-45</guid>
		<description>Excellent article, found your site today looking for some basic SQL pointers and got totally side tracked, reading lots of your other posts.

Just brilliant, 
thanks for sharing your knowledge!</description>
		<content:encoded><![CDATA[<p>Excellent article, found your site today looking for some basic SQL pointers and got totally side tracked, reading lots of your other posts.</p>
<p>Just brilliant,<br />
thanks for sharing your knowledge!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shlomo</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-18</link>
		<dc:creator>Shlomo</dc:creator>
		<pubDate>Fri, 31 Jul 2009 16:49:03 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-18</guid>
		<description>I&#039;ve been trying to explain this to people for so long!
You&#039;ve arranged everything so clearly from top to bottom, I actually use your analogies now myself.

Great post.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been trying to explain this to people for so long!<br />
You&#8217;ve arranged everything so clearly from top to bottom, I actually use your analogies now myself.</p>
<p>Great post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alon</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-16</link>
		<dc:creator>Alon</dc:creator>
		<pubDate>Tue, 28 Jul 2009 15:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-16</guid>
		<description>Great article!</description>
		<content:encoded><![CDATA[<p>Great article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Harrison</title>
		<link>http://explainextended.com/2009/07/12/double-thinking-in-sql/comment-page-1/#comment-13</link>
		<dc:creator>Mark Harrison</dc:creator>
		<pubDate>Tue, 21 Jul 2009 04:02:18 +0000</pubDate>
		<guid isPermaLink="false">http://explainextended.com/?p=2087#comment-13</guid>
		<description>Excellent article... I followed your link from stackoverflow.</description>
		<content:encoded><![CDATA[<p>Excellent article&#8230; I followed your link from stackoverflow.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
