<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>I gotta have my orange juice. &#187; index</title>
	<atom:link href="http://scottmoonen.com/tag/index/feed/" rel="self" type="application/rss+xml" />
	<link>http://scottmoonen.com</link>
	<description>Jesu, Juva</description>
	<lastBuildDate>Thu, 31 May 2012 16:33:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='scottmoonen.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/71456a1f4695cc8129f159ece0f7b3a1?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>I gotta have my orange juice. &#187; index</title>
		<link>http://scottmoonen.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://scottmoonen.com/osd.xml" title="I gotta have my orange juice." />
	<atom:link rel='hub' href='http://scottmoonen.com/?pushpress=hub'/>
		<item>
		<title>PostgreSQL foreign keys and indexes</title>
		<link>http://scottmoonen.com/2008/12/19/postgresql-foreign-keys-and-indexes/</link>
		<comments>http://scottmoonen.com/2008/12/19/postgresql-foreign-keys-and-indexes/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 16:15:30 +0000</pubDate>
		<dc:creator>Scott Moonen</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[constraint]]></category>
		<category><![CDATA[foreign key]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blog.fullvalence.com/?p=42</guid>
		<description><![CDATA[If you&#8217;re a frequent user of MySQL, you may be familiar with the fact that all MySQL table constraints automatically create indexes for you.  This is true of the InnoDB foreign key constraints, for which &#8220;an index is created on the referencing table automatically if it does not exist.&#8221; If you&#8217;re switching or considering a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scottmoonen.com&#038;blog=9709237&#038;post=114&#038;subd=smoonen&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.postgresql.org/"><img style="border:0 none;float:right;margin:.5em;" src="http://smoonen.files.wordpress.com/2008/12/postgres.gif?w=95&h=51" alt="[PostgreSQL]" width="95" height="51" /></a>If you&#8217;re a frequent user of MySQL, you may be familiar with the fact that all MySQL table constraints automatically create indexes for you.  This is true of the <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html">InnoDB foreign key constraints</a>, for which &#8220;an index is created on the referencing table automatically if it does not exist.&#8221;</p>
<p>If you&#8217;re switching or considering a switch to PostgreSQL, you should be aware that not all PostgreSQL table constraints will automatically create indexes for for you.  In PostgreSQL, a UNIQUE or PRIMARY KEY constraint on one or more fields <em>will</em> implicitly create an index for you.  However, in PostgreSQL a FOREIGN KEY constraint will <em>not</em> automatically create an index for you.</p>
<p>For each of your foreign key constraints, you should evaluate whether you want to create an index.  You may want to do this for optimizing your own queries, but be aware that it can also help to speed up DELETE queries on the referenced table and UPDATE queries on the referenced field.  This is because any foreign key reference must be located to enforce whatever ON DELETE and ON UPDATE behavior is in effect for the constraint.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smoonen.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smoonen.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smoonen.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smoonen.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smoonen.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smoonen.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smoonen.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smoonen.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smoonen.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smoonen.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smoonen.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smoonen.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smoonen.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smoonen.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scottmoonen.com&#038;blog=9709237&#038;post=114&#038;subd=smoonen&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scottmoonen.com/2008/12/19/postgresql-foreign-keys-and-indexes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c801efd19dadd22c4f35d3f1f6ea1869?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smoonen</media:title>
		</media:content>

		<media:content url="http://smoonen.files.wordpress.com/2008/12/postgres.gif" medium="image">
			<media:title type="html">[PostgreSQL]</media:title>
		</media:content>
	</item>
	</channel>
</rss>
