<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How to calculate table checksums in MySQL</title>
	<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/</link>
	<description>Stay curious!</description>
	<pubDate>Fri, 16 May 2008 03:49:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-14525</link>
		<author>Xaprb</author>
		<pubDate>Thu, 08 May 2008 11:57:44 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-14525</guid>
		<description>Useful indeed.  See Maatkit -- its mk-table-checksum tool does this :)</description>
		<content:encoded><![CDATA[<p>Useful indeed.  See Maatkit &#8212; its mk-table-checksum tool does this :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joachim Zobel</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-14524</link>
		<author>Joachim Zobel</author>
		<pubDate>Thu, 08 May 2008 11:41:12 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-14524</guid>
		<description>I have a useful trick to add. You can INSERT the checksum into a table  so that the checksum statement gets replicated. The trick is to then additionally OUTFILE and INFILE the checksum. This way the masters checksum gets replicated to the slaves so it can be easily compared to the local value.</description>
		<content:encoded><![CDATA[<p>I have a useful trick to add. You can INSERT the checksum into a table  so that the checksum statement gets replicated. The trick is to then additionally OUTFILE and INFILE the checksum. This way the masters checksum gets replicated to the slaves so it can be easily compared to the local value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-11618</link>
		<author>Xaprb</author>
		<pubDate>Fri, 15 Jun 2007 13:39:46 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-11618</guid>
		<description>The best thing to do is read the embedded Perl documentation, which becomes a man page if you install the tool, so 'man mysql-table-checksum'.  If there is anything missing from the documentation please submit a bug report, as I want to make it complete and useful.</description>
		<content:encoded><![CDATA[<p>The best thing to do is read the embedded Perl documentation, which becomes a man page if you install the tool, so &#8216;man mysql-table-checksum&#8217;.  If there is anything missing from the documentation please submit a bug report, as I want to make it complete and useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jok</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-11608</link>
		<author>Jok</author>
		<pubDate>Fri, 15 Jun 2007 08:13:02 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-11608</guid>
		<description>Hi Xaprb,

Thank you for your quick answer.
Could you be more specific about the tool (mysql-table-checksum) I should use in my case and the way to manipulate it ?</description>
		<content:encoded><![CDATA[<p>Hi Xaprb,</p>
<p>Thank you for your quick answer.<br />
Could you be more specific about the tool (mysql-table-checksum) I should use in my case and the way to manipulate it ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-11589</link>
		<author>Xaprb</author>
		<pubDate>Thu, 14 Jun 2007 20:29:26 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-11589</guid>
		<description>Yes, and I have now developed this technique into a very powerful tool to do so.  Look on Sourceforge for &lt;a href="http://sourceforge.net/projects/mysqltoolkit/" rel="nofollow"&gt;MySQL Table Checksum&lt;/a&gt;.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Yes, and I have now developed this technique into a very powerful tool to do so.  Look on Sourceforge for <a href="http://sourceforge.net/projects/mysqltoolkit/" rel="nofollow">MySQL Table Checksum</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jok</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-11587</link>
		<author>Jok</author>
		<pubDate>Thu, 14 Jun 2007 16:59:54 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-11587</guid>
		<description>Hi,

I think I have a very similar topic.
Have you ever tryed to sign a full table in order to certify it has not been changed ?

I work on Mysql 5.0. If you have suggestion to do so...

Thx in advance.

Jok</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I think I have a very similar topic.<br />
Have you ever tryed to sign a full table in order to certify it has not been changed ?</p>
<p>I work on Mysql 5.0. If you have suggestion to do so&#8230;</p>
<p>Thx in advance.</p>
<p>Jok</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-6820</link>
		<author>Xaprb</author>
		<pubDate>Tue, 15 May 2007 15:16:34 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-6820</guid>
		<description>&lt;p&gt;Hi qinyf, I have added this feature to &lt;a href="http://sourceforge.net/projects/mysqltoolkit" rel="nofollow"&gt;MySQL Table Checksum&lt;/a&gt;.  I have not released it, but you can get the code from Subversion.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Hi qinyf, I have added this feature to <a href="http://sourceforge.net/projects/mysqltoolkit" rel="nofollow">MySQL Table Checksum</a>.  I have not released it, but you can get the code from Subversion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qinyf</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-6493</link>
		<author>qinyf</author>
		<pubDate>Fri, 11 May 2007 02:35:19 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-6493</guid>
		<description>&lt;p&gt;hi Xaprb,

Because I'm in vacation these days, very sorry for my late reply.

It can be solved by WHERE if the PRIMARY KEY is auto-increase(it works well in my script), dividing the checksum into ranges. However, if the key isn't numeric or sortable, for example, an PRIMARY or UNIQUE KEY (ID1, ID2), a counter maybe needed to get checksum ranges.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>hi Xaprb,</p>
<p>Because I&#8217;m in vacation these days, very sorry for my late reply.</p>
<p>It can be solved by WHERE if the PRIMARY KEY is auto-increase(it works well in my script), dividing the checksum into ranges. However, if the key isn&#8217;t numeric or sortable, for example, an PRIMARY or UNIQUE KEY (ID1, ID2), a counter maybe needed to get checksum ranges.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-5956</link>
		<author>Xaprb</author>
		<pubDate>Mon, 23 Apr 2007 14:12:14 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-5956</guid>
		<description>&lt;p&gt;Hi qinyf,&lt;/p&gt;

&lt;p&gt;I have limited time right now since I'm at the MySQL conference, but these sound like issues I would like to address on the mysqltoolkit mailing list or bug tracking system, because I think these would be great features for &lt;a href="http://sourceforge.net/projects/mysqltoolkit" rel="nofollow"&gt;mysql-table-checksum&lt;/a&gt;.  Would you please add feature requests there?  When I get back from the conference I'll try to address it.  I think the issue of which index to use is solved in that tool (but let me know if it doesn't meet your needs), but maybe the tool can figure out a smart way of dividing the checksum into ranges.  It can already do a WHERE clause but that doesn't sound like enough for you.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Hi qinyf,</p>
<p>I have limited time right now since I&#8217;m at the MySQL conference, but these sound like issues I would like to address on the mysqltoolkit mailing list or bug tracking system, because I think these would be great features for <a href="http://sourceforge.net/projects/mysqltoolkit" rel="nofollow">mysql-table-checksum</a>.  Would you please add feature requests there?  When I get back from the conference I&#8217;ll try to address it.  I think the issue of which index to use is solved in that tool (but let me know if it doesn&#8217;t meet your needs), but maybe the tool can figure out a smart way of dividing the checksum into ranges.  It can already do a WHERE clause but that doesn&#8217;t sound like enough for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qinyf</title>
		<link>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-5947</link>
		<author>qinyf</author>
		<pubDate>Mon, 23 Apr 2007 05:35:28 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2007/01/25/how-to-calculate-table-checksums-in-mysql/#comment-5947</guid>
		<description>&lt;p&gt;So efficient it is! Thanks for your blog, i've checksumed some million-level tables in several minutes with user-variable based tech.&lt;/p&gt;

&lt;p&gt;For online product DB, the checksum calculation running during several minutes maybe a big pressure to the server. So I add "WHERE ID BETWEEN XX AND YY", in which "XX,YY are pre-calculated PRIMARY ID range, into the SQL and separate those ranges with sleeping several seconds in order to relax the server a little. It's like:&lt;/p&gt;

&lt;p&gt;calculate checksum, ID from 1 to 50000
sleep(3)
calculate checksum, ID from 50001 to 100000
sleep(3)
....&lt;/p&gt;

&lt;p&gt;Another suggestion is about how to calculating the checksum to a table that do not have an auto-increase PRIMARY(index) ID but an UNIQUE KEY. I'm not sure if it can work okay without "USE INDEX()" on both master and slave(the order maybe different?), maybe we can use "USE INDEX(CERTAIN_UNIQUE_KEY_NAME)" to force the check order.&lt;/p&gt;

&lt;p&gt;I also want to solve a problem which combine these two issue above, to calculate the checksum for a table has only an UNIQUE-KEY (e.g: ID1-ID2, a two-columns unique key) with separated ranges one by one, can you help me?&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>So efficient it is! Thanks for your blog, i&#8217;ve checksumed some million-level tables in several minutes with user-variable based tech.</p>
<p>For online product DB, the checksum calculation running during several minutes maybe a big pressure to the server. So I add &#8220;WHERE ID BETWEEN XX AND YY&#8221;, in which &#8220;XX,YY are pre-calculated PRIMARY ID range, into the SQL and separate those ranges with sleeping several seconds in order to relax the server a little. It&#8217;s like:</p>
<p>calculate checksum, ID from 1 to 50000<br />
sleep(3)<br />
calculate checksum, ID from 50001 to 100000<br />
sleep(3)<br />
&#8230;.</p>
<p>Another suggestion is about how to calculating the checksum to a table that do not have an auto-increase PRIMARY(index) ID but an UNIQUE KEY. I&#8217;m not sure if it can work okay without &#8220;USE INDEX()&#8221; on both master and slave(the order maybe different?), maybe we can use &#8220;USE INDEX(CERTAIN_UNIQUE_KEY_NAME)&#8221; to force the check order.</p>
<p>I also want to solve a problem which combine these two issue above, to calculate the checksum for a table has only an UNIQUE-KEY (e.g: ID1-ID2, a two-columns unique key) with separated ranges one by one, can you help me?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
