<?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>Gj's SQL blog</title>
	<atom:link href="http://gjsql.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gjsql.wordpress.com</link>
	<description>Greg's random (postgre)SQL posts.</description>
	<lastBuildDate>Thu, 02 Dec 2010 21:42:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gjsql.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/86ce6000c841d405ebcfe43cc11070cf?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Gj's SQL blog</title>
		<link>http://gjsql.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gjsql.wordpress.com/osd.xml" title="Gj&#039;s SQL blog" />
	<atom:link rel='hub' href='http://gjsql.wordpress.com/?pushpress=hub'/>
		<item>
		<title>are window functions always better ?</title>
		<link>http://gjsql.wordpress.com/2010/12/02/are-window-functions-always-better/</link>
		<comments>http://gjsql.wordpress.com/2010/12/02/are-window-functions-always-better/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 21:42:08 +0000</pubDate>
		<dc:creator>Grzegorz Jaskiewicz</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gjsql.wordpress.com/?p=49</guid>
		<description><![CDATA[Friend of mine asked me a very simple question. He needs to get a top row for every group of rows from a table. Here&#8217;s the table: \d+ "table" Table "public.table" Column &#124; Type &#124; Modifiers &#124; Storage &#124; Description --------+-----------------------------+-----------+---------+------------- id &#124; integer &#124; &#124; plain &#124; value &#124; integer &#124; &#124; plain &#124; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gjsql.wordpress.com&#038;blog=7414288&#038;post=49&#038;subd=gjsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
		<wfw:commentRss>http://gjsql.wordpress.com/2010/12/02/are-window-functions-always-better/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07a8b2ae31ca11464c23f375330e146a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gryzman</media:title>
		</media:content>
	</item>
		<item>
		<title>limited array_agg output on 8.3</title>
		<link>http://gjsql.wordpress.com/2010/11/27/limited-array_agg-output-on-8-3/</link>
		<comments>http://gjsql.wordpress.com/2010/11/27/limited-array_agg-output-on-8-3/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 16:30:42 +0000</pubDate>
		<dc:creator>Grzegorz Jaskiewicz</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gjsql.wordpress.com/?p=44</guid>
		<description><![CDATA[Someone asked about it on postgresql-general mailing list. Here&#8217;s my way of doing it. &#160; We need the limit_array_append() function. So here it is: CREATE FUNCTION limit_array_append(anyarray, anyelement, integer) RETURNS anyarray AS $_$    SELECT (array_append($1, $2))[1:$3]; $_$ LANGUAGE sql IMMUTABLE; The array_agg() function is obviously predefined on 8.3. Than we need to define the aggregate: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gjsql.wordpress.com&#038;blog=7414288&#038;post=44&#038;subd=gjsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
		<wfw:commentRss>http://gjsql.wordpress.com/2010/11/27/limited-array_agg-output-on-8-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07a8b2ae31ca11464c23f375330e146a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gryzman</media:title>
		</media:content>
	</item>
		<item>
		<title>how to speed up index on bytea, text, etc.</title>
		<link>http://gjsql.wordpress.com/2009/04/19/how-to-speed-up-index-on-bytea-text-etc/</link>
		<comments>http://gjsql.wordpress.com/2009/04/19/how-to-speed-up-index-on-bytea-text-etc/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 17:43:21 +0000</pubDate>
		<dc:creator>Grzegorz Jaskiewicz</dc:creator>
				<category><![CDATA[index]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://gjsql.wordpress.com/?p=31</guid>
		<description><![CDATA[Well, I recently had to create db to store some binary information. Now, these entries were to be unique in their category. Average size of bytea field was to be 2400 bytes (about 2kb). Everything was fine, until table filled with 1.3M unique entries, and I was really astound how slow insertion become. Turns out, that btree [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gjsql.wordpress.com&#038;blog=7414288&#038;post=31&#038;subd=gjsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
		<wfw:commentRss>http://gjsql.wordpress.com/2009/04/19/how-to-speed-up-index-on-bytea-text-etc/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07a8b2ae31ca11464c23f375330e146a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gryzman</media:title>
		</media:content>
	</item>
		<item>
		<title>on using different types in joins, and performance of it</title>
		<link>http://gjsql.wordpress.com/2009/04/19/on-using-different-types-in-joins-and-performance-of-it/</link>
		<comments>http://gjsql.wordpress.com/2009/04/19/on-using-different-types-in-joins-and-performance-of-it/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 16:44:37 +0000</pubDate>
		<dc:creator>Grzegorz Jaskiewicz</dc:creator>
				<category><![CDATA[index]]></category>
		<category><![CDATA[joins]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://gjsql.wordpress.com/?p=25</guid>
		<description><![CDATA[I get this question quite often from folks I work with, or people I join in their projects, usually with database designed by someone who is not very experienced in database world. Most of them, don&#8217;t understand why the hell I am pressing for using bigint/int as a key to a table. Here&#8217;s simple example, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gjsql.wordpress.com&#038;blog=7414288&#038;post=25&#038;subd=gjsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
		<wfw:commentRss>http://gjsql.wordpress.com/2009/04/19/on-using-different-types-in-joins-and-performance-of-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07a8b2ae31ca11464c23f375330e146a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gryzman</media:title>
		</media:content>
	</item>
		<item>
		<title>The power of Views</title>
		<link>http://gjsql.wordpress.com/2009/04/19/the-power-of-views/</link>
		<comments>http://gjsql.wordpress.com/2009/04/19/the-power-of-views/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 11:52:06 +0000</pubDate>
		<dc:creator>Grzegorz Jaskiewicz</dc:creator>
				<category><![CDATA[postgresql]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://gjsql.wordpress.com/?p=14</guid>
		<description><![CDATA[So, views. What are they useful for?  how can we utilize such a power of views ? Lets first get into how views are implemented in PostgreSQL, and any other professional DBE (Oracle, DB2, MicrosoftSQL). But I will focus specifically on Postgresql, of course. So, views are just queries, with given name. They produce some results, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gjsql.wordpress.com&#038;blog=7414288&#038;post=14&#038;subd=gjsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
		<wfw:commentRss>http://gjsql.wordpress.com/2009/04/19/the-power-of-views/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07a8b2ae31ca11464c23f375330e146a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gryzman</media:title>
		</media:content>
	</item>
		<item>
		<title>Unions and order</title>
		<link>http://gjsql.wordpress.com/2009/04/19/unions-and-order/</link>
		<comments>http://gjsql.wordpress.com/2009/04/19/unions-and-order/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 02:45:40 +0000</pubDate>
		<dc:creator>Grzegorz Jaskiewicz</dc:creator>
				<category><![CDATA[postgresql]]></category>
		<category><![CDATA[unions]]></category>

		<guid isPermaLink="false">http://gjsql.wordpress.com/?p=7</guid>
		<description><![CDATA[Quick note, on something that might save you few minutes. It&#8217;s about UNION [ALL]. And why you should never assume order of output to be predetermined by order of tables in query. So, to quickly describe &#8211; what unions are useful for. Say we have two tables, on surface unrelated, or maybe they are members [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gjsql.wordpress.com&#038;blog=7414288&#038;post=7&#038;subd=gjsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
		<wfw:commentRss>http://gjsql.wordpress.com/2009/04/19/unions-and-order/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07a8b2ae31ca11464c23f375330e146a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gryzman</media:title>
		</media:content>
	</item>
		<item>
		<title>Welcome!</title>
		<link>http://gjsql.wordpress.com/2009/04/19/3/</link>
		<comments>http://gjsql.wordpress.com/2009/04/19/3/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 02:20:31 +0000</pubDate>
		<dc:creator>Grzegorz Jaskiewicz</dc:creator>
				<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://gjsql.wordpress.com/?p=3</guid>
		<description><![CDATA[welcome to the world<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gjsql.wordpress.com&#038;blog=7414288&#038;post=3&#038;subd=gjsql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
		<wfw:commentRss>http://gjsql.wordpress.com/2009/04/19/3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07a8b2ae31ca11464c23f375330e146a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gryzman</media:title>
		</media:content>
	</item>
	</channel>
</rss>
