<?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: Why large IN clauses are problematic</title>
	<atom:link href="http://www.xaprb.com/blog/2006/06/28/why-large-in-clauses-are-problematic/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2006/06/28/why-large-in-clauses-are-problematic/</link>
	<description>Stay curious!</description>
	<lastBuildDate>Thu, 09 Feb 2012 09:56:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Venkat</title>
		<link>http://www.xaprb.com/blog/2006/06/28/why-large-in-clauses-are-problematic/#comment-17297</link>
		<dc:creator>Venkat</dc:creator>
		<pubDate>Thu, 19 Nov 2009 11:50:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=179#comment-17297</guid>
		<description>yes your article is good enough for optimization but i want to know wheather we make in Clause as Fast enough with creating appropriate indexes</description>
		<content:encoded><![CDATA[<p>yes your article is good enough for optimization but i want to know wheather we make in Clause as Fast enough with creating appropriate indexes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/06/28/why-large-in-clauses-are-problematic/#comment-14749</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Mon, 16 Jun 2008 16:05:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=179#comment-14749</guid>
		<description>I think I wrote this post when I was seeing a particular problem, and before I&#039;d started to see the problems with temp tables.  So my dogma switched as I learned :-)</description>
		<content:encoded><![CDATA[<p>I think I wrote this post when I was seeing a particular problem, and before I&#8217;d started to see the problems with temp tables.  So my dogma switched as I learned :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dewey</title>
		<link>http://www.xaprb.com/blog/2006/06/28/why-large-in-clauses-are-problematic/#comment-14747</link>
		<dc:creator>Dewey</dc:creator>
		<pubDate>Mon, 16 Jun 2008 14:36:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=179#comment-14747</guid>
		<description>Baron....I thought you were opposed to using temp tables?  I love them (especially memory) as a method to get variable data from the app layer with no schema dependency.   I&#039;d love to see a post from you regarding when you find them risky, and when this approach is ok.</description>
		<content:encoded><![CDATA[<p>Baron&#8230;.I thought you were opposed to using temp tables?  I love them (especially memory) as a method to get variable data from the app layer with no schema dependency.   I&#8217;d love to see a post from you regarding when you find them risky, and when this approach is ok.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Truitt</title>
		<link>http://www.xaprb.com/blog/2006/06/28/why-large-in-clauses-are-problematic/#comment-14697</link>
		<dc:creator>Ben Truitt</dc:creator>
		<pubDate>Wed, 04 Jun 2008 21:57:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=179#comment-14697</guid>
		<description>I just wanted to share additional news on this.

 My DBA had a really hard time believing my solution in the first email in this thread should be faster.  So after digging some, he ran an ANALYZE on the tables in question.

 This helps the PostgreSQL planner out to create more optimal query plans.

 It turns out that after analyze the original query that uses an &quot;IN&quot; takes 1ms.

 So we went from:
IN Clause: ~4500ms
Inner Join: ~300ms
Analyze with IN Clause: ~1ms

Holy cow.

The lesson is: use explain, use analyze, and consult your DBAs. They are your friends.</description>
		<content:encoded><![CDATA[<p>I just wanted to share additional news on this.</p>
<p> My DBA had a really hard time believing my solution in the first email in this thread should be faster.  So after digging some, he ran an ANALYZE on the tables in question.</p>
<p> This helps the PostgreSQL planner out to create more optimal query plans.</p>
<p> It turns out that after analyze the original query that uses an &#8220;IN&#8221; takes 1ms.</p>
<p> So we went from:<br />
IN Clause: ~4500ms<br />
Inner Join: ~300ms<br />
Analyze with IN Clause: ~1ms</p>
<p>Holy cow.</p>
<p>The lesson is: use explain, use analyze, and consult your DBAs. They are your friends.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Truitt</title>
		<link>http://www.xaprb.com/blog/2006/06/28/why-large-in-clauses-are-problematic/#comment-14696</link>
		<dc:creator>Ben Truitt</dc:creator>
		<pubDate>Wed, 04 Jun 2008 16:13:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=179#comment-14696</guid>
		<description>In postgreSQL, the suggestion to use inner joins can result in dramatic improvements, because postgreSQL does use ORs as described and proved above.

In our case, we went from ~4500ms for the query to ~300ms

An order of magnitude improvement!

Thanks for the great post!!</description>
		<content:encoded><![CDATA[<p>In postgreSQL, the suggestion to use inner joins can result in dramatic improvements, because postgreSQL does use ORs as described and proved above.</p>
<p>In our case, we went from ~4500ms for the query to ~300ms</p>
<p>An order of magnitude improvement!</p>
<p>Thanks for the great post!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

