<?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 for Mellow Morning</title>
	<atom:link href="http://www.mellowmorning.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mellowmorning.com</link>
	<description>Blogging the world of IT and Business</description>
	<lastBuildDate>Sat, 06 Mar 2010 17:08:02 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Django query set iterator &#8211; for really large, querysets by Django query set iterator – for really large, querysets</title>
		<link>http://www.mellowmorning.com/2010/03/03/django-query-set-iterator-for-really-large-querysets/comment-page-1/#comment-7929</link>
		<dc:creator>Django query set iterator – for really large, querysets</dc:creator>
		<pubDate>Sat, 06 Mar 2010 17:08:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=135#comment-7929</guid>
		<description>[...] solution for dealing with very large querysets in django when memory is a limiting constraint, with some nice discussion in the comments about why limit and [...]</description>
		<content:encoded><![CDATA[<p>[...] solution for dealing with very large querysets in django when memory is a limiting constraint, with some nice discussion in the comments about why limit and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django query set iterator &#8211; for really large, querysets by rick</title>
		<link>http://www.mellowmorning.com/2010/03/03/django-query-set-iterator-for-really-large-querysets/comment-page-1/#comment-7927</link>
		<dc:creator>rick</dc:creator>
		<pubDate>Fri, 05 Mar 2010 01:51:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=135#comment-7927</guid>
		<description>@Henrique: even with UUIDs this would still work, it works as long as you have some unique sortable identifier. Since UUIDs are unique they are by definition sortable so the method still works flawlessly.

The problem here was that the database client (Psycopg2) was putting all (or atleast, way too much) of the rows in memory so the application ran out of memory. For the record, we&#039;re using Postgres 8.4.

@Oleg: using a limit is nice on the clientside, but the server doesn&#039;t like it. When you&#039;re using LIMIT/OFFSET queries the server has to get all the results and only return the requested ones.

So when doing `LIMIT 1 OFFSET 1000000` the server will fetch 1000001 rows  and discard 1000000 of them. On a large table with a large offset this is a very slow process. That is also the reason that Google only shows the first 1000 results ;)

With this iterator your database is able to use the index on the primary key so it&#039;s always fast to fetch the requested rows.</description>
		<content:encoded><![CDATA[<p>@Henrique: even with UUIDs this would still work, it works as long as you have some unique sortable identifier. Since UUIDs are unique they are by definition sortable so the method still works flawlessly.</p>
<p>The problem here was that the database client (Psycopg2) was putting all (or atleast, way too much) of the rows in memory so the application ran out of memory. For the record, we&#8217;re using Postgres 8.4.</p>
<p>@Oleg: using a limit is nice on the clientside, but the server doesn&#8217;t like it. When you&#8217;re using LIMIT/OFFSET queries the server has to get all the results and only return the requested ones.</p>
<p>So when doing `LIMIT 1 OFFSET 1000000` the server will fetch 1000001 rows  and discard 1000000 of them. On a large table with a large offset this is a very slow process. That is also the reason that Google only shows the first 1000 results ;)</p>
<p>With this iterator your database is able to use the index on the primary key so it&#8217;s always fast to fetch the requested rows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django query set iterator &#8211; for really large, querysets by Thierry</title>
		<link>http://www.mellowmorning.com/2010/03/03/django-query-set-iterator-for-really-large-querysets/comment-page-1/#comment-7924</link>
		<dc:creator>Thierry</dc:creator>
		<pubDate>Thu, 04 Mar 2010 11:29:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=135#comment-7924</guid>
		<description>Well the PK based method above is quite similar to using slicing.
Slicing however gives a few problems.

Something like [100000:200000] is not very nice on your DB. The PK method is less heavy.
If you use slicing though, be sure to iterate from the back of the list to the beginning. Otherwise you&#039;ll have problems when items are being removed from the list by the process you use it for.</description>
		<content:encoded><![CDATA[<p>Well the PK based method above is quite similar to using slicing.<br />
Slicing however gives a few problems.</p>
<p>Something like [100000:200000] is not very nice on your DB. The PK method is less heavy.<br />
If you use slicing though, be sure to iterate from the back of the list to the beginning. Otherwise you&#8217;ll have problems when items are being removed from the list by the process you use it for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django query set iterator &#8211; for really large, querysets by Oleg</title>
		<link>http://www.mellowmorning.com/2010/03/03/django-query-set-iterator-for-really-large-querysets/comment-page-1/#comment-7923</link>
		<dc:creator>Oleg</dc:creator>
		<pubDate>Thu, 04 Mar 2010 11:26:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=135#comment-7923</guid>
		<description>Why not to use limit function on given queryset. Like qs[from:to] it will add LIMIT OFFSET construction to your query.</description>
		<content:encoded><![CDATA[<p>Why not to use limit function on given queryset. Like qs[from:to] it will add LIMIT OFFSET construction to your query.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django query set iterator &#8211; for really large, querysets by Thierry</title>
		<link>http://www.mellowmorning.com/2010/03/03/django-query-set-iterator-for-really-large-querysets/comment-page-1/#comment-7922</link>
		<dc:creator>Thierry</dc:creator>
		<pubDate>Thu, 04 Mar 2010 11:24:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=135#comment-7922</guid>
		<description>Hey Henrique, thanks for the input. As far as I can see its the actual reading of the resultset from the db into python&#039;s memory which causes the problem. So the raw result from the DB, not actually Django&#039;s orm layer.

Would probably need to adjust some things in the cursor handling within django&#039;s orm to implement a fix like you suggest...</description>
		<content:encoded><![CDATA[<p>Hey Henrique, thanks for the input. As far as I can see its the actual reading of the resultset from the db into python&#8217;s memory which causes the problem. So the raw result from the DB, not actually Django&#8217;s orm layer.</p>
<p>Would probably need to adjust some things in the cursor handling within django&#8217;s orm to implement a fix like you suggest&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django query set iterator &#8211; for really large, querysets by Henrique</title>
		<link>http://www.mellowmorning.com/2010/03/03/django-query-set-iterator-for-really-large-querysets/comment-page-1/#comment-7921</link>
		<dc:creator>Henrique</dc:creator>
		<pubDate>Thu, 04 Mar 2010 02:44:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=135#comment-7921</guid>
		<description>Django&#039;s iterator() helps on avoiding the internal cache, but I think you&#039;re hitting a limit on either the database adaptor on the database itself. Could benefit from some DB tuning. Are you using MySQL?

Now, the problem with the snippet is that it naturally won&#039;t work for non-auto PKs - UUIDs for instance. As such, it means it won&#039;t work with really big or sharded databases, that can&#039;t use auto PKs. Those are the ones that would benefit the most from burst loading result sets.

If the problem is simply memory usage and is limited to batch tasks, maybe streaming the result set to disk and consuming on a queue later on could help.</description>
		<content:encoded><![CDATA[<p>Django&#8217;s iterator() helps on avoiding the internal cache, but I think you&#8217;re hitting a limit on either the database adaptor on the database itself. Could benefit from some DB tuning. Are you using MySQL?</p>
<p>Now, the problem with the snippet is that it naturally won&#8217;t work for non-auto PKs &#8211; UUIDs for instance. As such, it means it won&#8217;t work with really big or sharded databases, that can&#8217;t use auto PKs. Those are the ones that would benefit the most from burst loading result sets.</p>
<p>If the problem is simply memory usage and is limited to batch tasks, maybe streaming the result set to disk and consuming on a queue later on could help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django vs Symfony by zoja</title>
		<link>http://www.mellowmorning.com/2008/08/27/django-vs-symfony/comment-page-1/#comment-7914</link>
		<dc:creator>zoja</dc:creator>
		<pubDate>Fri, 05 Feb 2010 11:37:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=68#comment-7914</guid>
		<description>I&#039;m a great Symfony fan and i really found this article very interesting. You got me interested in looking further at Django. Seems like the perfect solution for big applications with high server load. Thanks for the the comparison :)</description>
		<content:encoded><![CDATA[<p>I&#8217;m a great Symfony fan and i really found this article very interesting. You got me interested in looking further at Django. Seems like the perfect solution for big applications with high server load. Thanks for the the comparison :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django vs Symfony by nihimu</title>
		<link>http://www.mellowmorning.com/2008/08/27/django-vs-symfony/comment-page-1/#comment-7846</link>
		<dc:creator>nihimu</dc:creator>
		<pubDate>Mon, 28 Dec 2009 03:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=68#comment-7846</guid>
		<description>As languages go I can say that after learning both by heart, only one of the feel like a real language. And its not PHP!</description>
		<content:encoded><![CDATA[<p>As languages go I can say that after learning both by heart, only one of the feel like a real language. And its not PHP!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YTM launch!! by VidJa</title>
		<link>http://www.mellowmorning.com/2009/12/11/ytm-launch/comment-page-1/#comment-7839</link>
		<dc:creator>VidJa</dc:creator>
		<pubDate>Fri, 11 Dec 2009 22:14:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=126#comment-7839</guid>
		<description>Gave site!</description>
		<content:encoded><![CDATA[<p>Gave site!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django vs Symfony by Drupal&#8217;s prominence is hurting the growth of the PHP frameworks, such as Symfony</title>
		<link>http://www.mellowmorning.com/2008/08/27/django-vs-symfony/comment-page-1/#comment-7821</link>
		<dc:creator>Drupal&#8217;s prominence is hurting the growth of the PHP frameworks, such as Symfony</dc:creator>
		<pubDate>Mon, 16 Nov 2009 00:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=68#comment-7821</guid>
		<description>[...] versus framework, which would be more fair than the current framework versus CMS comparisons. (When the Django versus Symfony comparison is made, Symfony is at least able to hold its own, with at least a few areas where it is superior to [...]</description>
		<content:encoded><![CDATA[<p>[...] versus framework, which would be more fair than the current framework versus CMS comparisons. (When the Django versus Symfony comparison is made, Symfony is at least able to hold its own, with at least a few areas where it is superior to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Introducing a cross site ajax plugin for Prototype by Icaro Dourado</title>
		<link>http://www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/comment-page-1/#comment-7648</link>
		<dc:creator>Icaro Dourado</dc:creator>
		<pubDate>Thu, 30 Jul 2009 03:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/#comment-7648</guid>
		<description>Hi everyone,
This solution helps me A LOT!</description>
		<content:encoded><![CDATA[<p>Hi everyone,<br />
This solution helps me A LOT!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Updated cross site ajax plugin for Prototype by Confluence: Régis Leray</title>
		<link>http://www.mellowmorning.com/2007/11/07/updated-cross-site-ajax-plugin-for-prototype/comment-page-1/#comment-7574</link>
		<dc:creator>Confluence: Régis Leray</dc:creator>
		<pubDate>Wed, 15 Jul 2009 10:27:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/2007/11/07/updated-cross-site-ajax-plugin-for-prototype/#comment-7574</guid>
		<description>&lt;strong&gt;Emailvision documentation...&lt;/strong&gt;

PRESENTATION Historiquement l&#039;envoi d&#039;email etait effectue par notre propre serveur SMTP, ne gerant pas en mode queue les messages (si erreur non reemission des messages), et aucune statistique concernant les envois. D&#039;ou l&#039;utilisation,......</description>
		<content:encoded><![CDATA[<p><strong>Emailvision documentation&#8230;</strong></p>
<p>PRESENTATION Historiquement l&#8217;envoi d&#8217;email etait effectue par notre propre serveur SMTP, ne gerant pas en mode queue les messages (si erreur non reemission des messages), et aucune statistique concernant les envois. D&#8217;ou l&#8217;utilisation,&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Introducing a cross site ajax plugin for Prototype by Max Kiesler - Designer &#187; Blog Archive &#187; Learning AJAX &#38; Javascript by Example - Tutorials, Source-Code and Documentation</title>
		<link>http://www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/comment-page-1/#comment-7345</link>
		<dc:creator>Max Kiesler - Designer &#187; Blog Archive &#187; Learning AJAX &#38; Javascript by Example - Tutorials, Source-Code and Documentation</dc:creator>
		<pubDate>Tue, 02 Jun 2009 07:08:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/#comment-7345</guid>
		<description>[...] Introducing a Cross Site AJAX Plugin for Prototype &#8220;During cross site Ajax requests the standard XmlHttpRequest approach breaks down. The problem is that XmlHttpRequest is bounded by the same site policy. Fortunately the script tag has the freedom to do as it pleases.&#8221; [...]</description>
		<content:encoded><![CDATA[<p>[...] Introducing a Cross Site AJAX Plugin for Prototype &#8220;During cross site Ajax requests the standard XmlHttpRequest approach breaks down. The problem is that XmlHttpRequest is bounded by the same site policy. Fortunately the script tag has the freedom to do as it pleases.&#8221; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ten reasons why Symfony rocks &#8211; Part 2 by Kenneth van Rumste</title>
		<link>http://www.mellowmorning.com/2007/09/08/ten-reasons-why-symfony-rocks-part-2/comment-page-1/#comment-7326</link>
		<dc:creator>Kenneth van Rumste</dc:creator>
		<pubDate>Tue, 26 May 2009 09:33:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/2007/09/08/ten-reasons-why-symfony-rocks-part-2/#comment-7326</guid>
		<description>Any idea how it&#039;s possible to get the i18n:extract to search class files too? In the Symfony, we still find: Unfortunately, the i18n:extract task does not yet parse form classes for untranslated strings. This is a huge problem... anyone an idea?</description>
		<content:encoded><![CDATA[<p>Any idea how it&#8217;s possible to get the i18n:extract to search class files too? In the Symfony, we still find: Unfortunately, the i18n:extract task does not yet parse form classes for untranslated strings. This is a huge problem&#8230; anyone an idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django vs Symfony by Mellow Morning &#34; Django vs Symfony</title>
		<link>http://www.mellowmorning.com/2008/08/27/django-vs-symfony/comment-page-1/#comment-7310</link>
		<dc:creator>Mellow Morning &#34; Django vs Symfony</dc:creator>
		<pubDate>Mon, 18 May 2009 23:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.mellowmorning.com/?p=68#comment-7310</guid>
		<description>[...] rest is here: Mellow Morning &quot; Django vs Symfony   Share and [...]</description>
		<content:encoded><![CDATA[<p>[...] rest is here: Mellow Morning &quot; Django vs Symfony   Share and [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
