<?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/"
	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>Comments on: Working around MySQL&#8217;s horrible &#8220;ORDER BY rand()&#8221; in Django</title>
	<atom:link href="http://seanoc.wordpress.com/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanoc.wordpress.com/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/</link>
	<description>Some words from a simple web develper.</description>
	<lastBuildDate>Wed, 27 May 2009 01:20:32 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sean O'Connor</title>
		<link>http://seanoc.wordpress.com/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/#comment-24</link>
		<dc:creator>Sean O'Connor</dc:creator>
		<pubDate>Mon, 28 Jan 2008 03:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://seanoc.com/archive/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/#comment-24</guid>
		<description>Martin:  As far as I know Postgres is smarter/faster at doing randomly ordered selects but do some experimentation.  If you get the performance you are looking for then great, otherwise this solution may be for you.

David:  Very cool, there are actually a few places in my code where I do that, just didn&#039;t happen to come across it when I grabbed this example.  Thanks for the tip.

Bjorn:  Also a cool solution, nice work.</description>
		<content:encoded><![CDATA[<p>Martin:  As far as I know Postgres is smarter/faster at doing randomly ordered selects but do some experimentation.  If you get the performance you are looking for then great, otherwise this solution may be for you.</p>
<p>David:  Very cool, there are actually a few places in my code where I do that, just didn&#8217;t happen to come across it when I grabbed this example.  Thanks for the tip.</p>
<p>Bjorn:  Also a cool solution, nice work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bjorn Kempen</title>
		<link>http://seanoc.wordpress.com/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/#comment-23</link>
		<dc:creator>Bjorn Kempen</dc:creator>
		<pubDate>Sun, 27 Jan 2008 10:54:59 +0000</pubDate>
		<guid isPermaLink="false">http://seanoc.com/archive/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/#comment-23</guid>
		<description>I made a blog post about pretty much the same thing a few days ago. Might be an interesting read :)
http://blog.buffis.com/?p=64</description>
		<content:encoded><![CDATA[<p>I made a blog post about pretty much the same thing a few days ago. Might be an interesting read <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://blog.buffis.com/?p=64" rel="nofollow">http://blog.buffis.com/?p=64</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Buxton</title>
		<link>http://seanoc.wordpress.com/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/#comment-22</link>
		<dc:creator>David Buxton</dc:creator>
		<pubDate>Sun, 27 Jan 2008 10:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://seanoc.com/archive/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/#comment-22</guid>
		<description>You missed a chance to use my favourite Python-ism: list comprehensions. Last few lines could be written like this:

rows = cursor.fetchall()
picture_ids = [row[0] for row in random.sample(rows, 6)]
pictures = user.picture_set.filter(id__in=picture_ids)</description>
		<content:encoded><![CDATA[<p>You missed a chance to use my favourite Python-ism: list comprehensions. Last few lines could be written like this:</p>
<p>rows = cursor.fetchall()<br />
picture_ids = [row[0] for row in random.sample(rows, 6)]<br />
pictures = user.picture_set.filter(id__in=picture_ids)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://seanoc.wordpress.com/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/#comment-25</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Sun, 27 Jan 2008 08:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://seanoc.com/archive/2008/01/27/working-around-mysqls-horrible-order-by-rand-in-django/#comment-25</guid>
		<description>Is it ok to use pictures = User.picture_set.filter(private=False).order_by(&#039;?&#039;)[:6] with postgres?</description>
		<content:encoded><![CDATA[<p>Is it ok to use pictures = User.picture_set.filter(private=False).order_by(&#8216;?&#8217;)[:6] with postgres?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
