<?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: Pseudo Reverse Indexes in MySQL</title>
	<atom:link href="http://www.igvita.com/2007/08/20/pseudo-reverse-indexes-in-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2007/08/20/pseudo-reverse-indexes-in-mysql/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Fri, 12 Mar 2010 13:16:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2007/08/20/pseudo-reverse-indexes-in-mysql/comment-page-1/#comment-62285</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Thu, 23 Aug 2007 03:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/08/20/pseudo-reverse-indexes-in-mysql/#comment-62285</guid>
		<description>Mike, good point! I just ran a quick test, and everything seems to be a-ok:
&lt;blockquote&gt;select timestampdiff(SECOND, '2050-01-01','2035-01-01'); 
&gt;&gt; -473385600&lt;/blockquote&gt;

Dustin, that's what I was thinking too! I was honestly surprised to find this limitation in place. Then again, could this be one of these 'any DBA will know type gotchas'?

Peter, thanks for the tip on meta tables. I might have to reconsider our current table structure, and I'll keep that in mind. I guess the only way to learn these things is with experience!</description>
		<content:encoded><![CDATA[<p>Mike, good point! I just ran a quick test, and everything seems to be a-ok:</p>
<blockquote><p>select timestampdiff(SECOND, &#8216;2050-01-01&#8242;,&#8217;2035-01-01&#8242;);<br />
>> -473385600</p></blockquote>
<p>Dustin, that&#8217;s what I was thinking too! I was honestly surprised to find this limitation in place. Then again, could this be one of these &#8216;any DBA will know type gotchas&#8217;?</p>
<p>Peter, thanks for the tip on meta tables. I might have to reconsider our current table structure, and I&#8217;ll keep that in mind. I guess the only way to learn these things is with experience!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Cooper</title>
		<link>http://www.igvita.com/2007/08/20/pseudo-reverse-indexes-in-mysql/comment-page-1/#comment-61942</link>
		<dc:creator>Peter Cooper</dc:creator>
		<pubDate>Tue, 21 Aug 2007 22:33:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/08/20/pseudo-reverse-indexes-in-mysql/#comment-61942</guid>
		<description>Interesting hack! I'll be sure to give this a try if it comes up as an issue in future. It didn't happen with Feed Digest, despite a bigger data set, because quite early on I split the data set up into a meta table with VERY light rows, and then a table with the actual data. So the ORDER BY / GROUP BY stuff all takes place on the meta, then the IDs from that are used to load the real data from elsewhere. This solves so many problems as each row can be a fixed width (about 20 bytes I think at the moment). The main reason for this solution was due to constant creation of temporary tables after we reached a million or so entries. With the meta table, it works smoothly up into the tens of millions.</description>
		<content:encoded><![CDATA[<p>Interesting hack! I&#8217;ll be sure to give this a try if it comes up as an issue in future. It didn&#8217;t happen with Feed Digest, despite a bigger data set, because quite early on I split the data set up into a meta table with VERY light rows, and then a table with the actual data. So the ORDER BY / GROUP BY stuff all takes place on the meta, then the IDs from that are used to load the real data from elsewhere. This solves so many problems as each row can be a fixed width (about 20 bytes I think at the moment). The main reason for this solution was due to constant creation of temporary tables after we reached a million or so entries. With the meta table, it works smoothly up into the tens of millions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin Puryear</title>
		<link>http://www.igvita.com/2007/08/20/pseudo-reverse-indexes-in-mysql/comment-page-1/#comment-61909</link>
		<dc:creator>Dustin Puryear</dc:creator>
		<pubDate>Tue, 21 Aug 2007 20:21:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/08/20/pseudo-reverse-indexes-in-mysql/#comment-61909</guid>
		<description>Very interesting. I have to wonder why this doesn't come up more often if large sites that rely on MySQL, at least for *some* of their services, must be hitting the same limitations, e.g., Yahoo Finance?

--
Dustin Puryear
Author, &lt;a href="http://www.puryear-it.com/pubs/linux-unix-best-practices" rel="nofollow"&gt;Best Practices for Managing Linux and UNIX Servers&lt;/a&gt;
&lt;a href="http://www.puryear-it.com" rel="nofollow"&gt;http://www.puryear-it.com&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Very interesting. I have to wonder why this doesn&#8217;t come up more often if large sites that rely on MySQL, at least for *some* of their services, must be hitting the same limitations, e.g., Yahoo Finance?</p>
<p>&#8211;<br />
Dustin Puryear<br />
Author, <a href="http://www.puryear-it.com/pubs/linux-unix-best-practices" rel="nofollow">Best Practices for Managing Linux and UNIX Servers</a><br />
<a href="http://www.puryear-it.com" rel="nofollow">http://www.puryear-it.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Woodhouse</title>
		<link>http://www.igvita.com/2007/08/20/pseudo-reverse-indexes-in-mysql/comment-page-1/#comment-61625</link>
		<dc:creator>Mike Woodhouse</dc:creator>
		<pubDate>Mon, 20 Aug 2007 21:20:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/blog/2007/08/20/pseudo-reverse-indexes-in-mysql/#comment-61625</guid>
		<description>I don't think the date chosen should matter particularly, provided that negative integers are indexed the same as positive ones.  And assuming that timestampdiff will return a negative number by 2035, if it doesn't already.

If so, you should be good until 999999999 seconds after 01/01/2035, or another 31 years or so. By which time I hope we'll all be around to still care.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think the date chosen should matter particularly, provided that negative integers are indexed the same as positive ones.  And assuming that timestampdiff will return a negative number by 2035, if it doesn&#8217;t already.</p>
<p>If so, you should be good until 999999999 seconds after 01/01/2035, or another 31 years or so. By which time I hope we&#8217;ll all be around to still care.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
