<?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: Implementing efficient counters with MySQL</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:23:57 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Hartym</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-182983</link>
		<dc:creator>Hartym</dc:creator>
		<pubDate>Thu, 01 Nov 2007 10:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-182983</guid>
		<description>Thanks for sharing, that&#039;s a very interesting post i&#039;ll use soon to optimise my pastebin.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing, that&#8217;s a very interesting post i&#8217;ll use soon to optimise my pastebin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yet Another Blog &#187; Blog Archive &#187; Links - Mon Jul 16 2007 09:10AM</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-145891</link>
		<dc:creator>Yet Another Blog &#187; Blog Archive &#187; Links - Mon Jul 16 2007 09:10AM</dc:creator>
		<pubDate>Mon, 16 Jul 2007 08:14:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-145891</guid>
		<description>[...] Implementing efficient counters with MySQL [from MySQL Performance Blog] [...]</description>
		<content:encoded><![CDATA[<p>[...] Implementing efficient counters with MySQL [from MySQL Performance Blog] [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-142942</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Thu, 05 Jul 2007 18:32:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-142942</guid>
		<description>Yep Sheeri,

Insert delayed can be good but it can also be pretty nasty - because of this extra thread which gathers data overall performance can get worse than with standard insert. 

It can surely help however if you run into table lock issue, which can be avoided for log table easily.</description>
		<content:encoded><![CDATA[<p>Yep Sheeri,</p>
<p>Insert delayed can be good but it can also be pretty nasty &#8211; because of this extra thread which gathers data overall performance can get worse than with standard insert. </p>
<p>It can surely help however if you run into table lock issue, which can be avoided for log table easily.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sheeri</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-142936</link>
		<dc:creator>Sheeri</dc:creator>
		<pubDate>Thu, 05 Jul 2007 17:27:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-142936</guid>
		<description>don&#039;t forget INSERT DELAYED -- that&#039;s a big win for batch inserting when you can approximate what &quot;the count as of now&quot; really is.</description>
		<content:encoded><![CDATA[<p>don&#8217;t forget INSERT DELAYED &#8212; that&#8217;s a big win for batch inserting when you can approximate what &#8220;the count as of now&#8221; really is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sebcio</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-142444</link>
		<dc:creator>sebcio</dc:creator>
		<pubDate>Tue, 03 Jul 2007 20:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-142444</guid>
		<description>if your application is PHP you can use XCache and its API to provide nice counter. 
A small pseudo-code example could be found in its wiki:
if (!xcache_isset(&quot;count&quot;)) {
 xcache_set(&quot;count&quot;, load_count_from_mysql());
}
?&gt;
This guest book has been visited  times.
</description>
		<content:encoded><![CDATA[<p>if your application is PHP you can use XCache and its API to provide nice counter.<br />
A small pseudo-code example could be found in its wiki:<br />
if (!xcache_isset(&#8221;count&#8221;)) {<br />
 xcache_set(&#8221;count&#8221;, load_count_from_mysql());<br />
}<br />
?&gt;<br />
This guest book has been visited  times.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-141982</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 02 Jul 2007 15:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-141982</guid>
		<description>guillaume,

Sure.  I kind of more viewed it for the single instance case more.   But using another instance for this seems like a good idea especially to offload replication. 

As you do not show to many counters per page fetching them from another instance does not add a lot of overhead. 

And while counter is zero you do not need to store it so INSERT ON DUPLICATE KEY UPDATE can indeed be a lot of help.</description>
		<content:encoded><![CDATA[<p>guillaume,</p>
<p>Sure.  I kind of more viewed it for the single instance case more.   But using another instance for this seems like a good idea especially to offload replication. </p>
<p>As you do not show to many counters per page fetching them from another instance does not add a lot of overhead. </p>
<p>And while counter is zero you do not need to store it so INSERT ON DUPLICATE KEY UPDATE can indeed be a lot of help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-141980</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 02 Jul 2007 15:50:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-141980</guid>
		<description>Jay,  Robin wrote that not me. 

I mentioned Archive as possible candidate for temporary log table.</description>
		<content:encoded><![CDATA[<p>Jay,  Robin wrote that not me. </p>
<p>I mentioned Archive as possible candidate for temporary log table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay Pipes</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-141976</link>
		<dc:creator>Jay Pipes</dc:creator>
		<pubDate>Mon, 02 Jul 2007 15:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-141976</guid>
		<description>Hi Peter!

You wrote: &quot;When implementing a ‘log’ table and a ‘counts’ table which is regenerated every so often it would be nice to have a ‘Constant DB’ (CDB, see: http://cr.yp.to/cdb.html) storage engine, wouldn’t it? It has limited features (write once, read many - no updates) but it provides fantastic read/write performance.&quot;

What about ARCHIVE?  No updates, good read and write performance...

Cheers, and BTW, I 100% agree with everything you say in this article; I&#039;ve been including this information in my slides for a while now.

-jay</description>
		<content:encoded><![CDATA[<p>Hi Peter!</p>
<p>You wrote: &#8220;When implementing a ‘log’ table and a ‘counts’ table which is regenerated every so often it would be nice to have a ‘Constant DB’ (CDB, see: <a href="http://cr.yp.to/cdb.html)" rel="nofollow">http://cr.yp.to/cdb.html)</a> storage engine, wouldn’t it? It has limited features (write once, read many &#8211; no updates) but it provides fantastic read/write performance.&#8221;</p>
<p>What about ARCHIVE?  No updates, good read and write performance&#8230;</p>
<p>Cheers, and BTW, I 100% agree with everything you say in this article; I&#8217;ve been including this information in my slides for a while now.</p>
<p>-jay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: guillaume</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-141965</link>
		<dc:creator>guillaume</dc:creator>
		<pubDate>Mon, 02 Jul 2007 14:27:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-141965</guid>
		<description>The other idea is to use a dedicated database instance for view summaries. It works quite well. And after all you don&#039;t re-read the value every time. Just use ON DUPLICATE KEY UPDATE instead!</description>
		<content:encoded><![CDATA[<p>The other idea is to use a dedicated database instance for view summaries. It works quite well. And after all you don&#8217;t re-read the value every time. Just use ON DUPLICATE KEY UPDATE instead!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin</title>
		<link>http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/comment-page-1/#comment-141848</link>
		<dc:creator>Robin</dc:creator>
		<pubDate>Mon, 02 Jul 2007 09:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/07/01/implementing-efficient-counters-with-mysql/#comment-141848</guid>
		<description>Not really contributing to the discussion, but maybe someone gets inspired to write a new storage engine ;) : When implementing a &#039;log&#039; table and a &#039;counts&#039; table which is regenerated every so often it would be nice to have a &#039;Constant DB&#039; (CDB, see: http://cr.yp.to/cdb.html) storage engine, wouldn&#039;t it? It has limited features (write once, read many - no updates) but it provides fantastic read/write performance.
Shouldn&#039;t be too difficult to implement something like that as cdb&#039;s API is similar to bdb. Ofcourse update, replace &amp; delete wouldn&#039;t be supported in such an engine, as it is &#039;constant&#039;.</description>
		<content:encoded><![CDATA[<p>Not really contributing to the discussion, but maybe someone gets inspired to write a new storage engine <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  : When implementing a &#8216;log&#8217; table and a &#8216;counts&#8217; table which is regenerated every so often it would be nice to have a &#8216;Constant DB&#8217; (CDB, see: <a href="http://cr.yp.to/cdb.html)" rel="nofollow">http://cr.yp.to/cdb.html)</a> storage engine, wouldn&#8217;t it? It has limited features (write once, read many &#8211; no updates) but it provides fantastic read/write performance.<br />
Shouldn&#8217;t be too difficult to implement something like that as cdb&#8217;s API is similar to bdb. Ofcourse update, replace &amp; delete wouldn&#8217;t be supported in such an engine, as it is &#8216;constant&#8217;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
