<?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: Views counter &#8211; MySIAM vs InnoDB</title>
	<atom:link href="http://bkwld.com/blog/2008/03/views-counter-mysiam-vs-innodb/feed/" rel="self" type="application/rss+xml" />
	<link>http://bkwld.com/blog/2008/03/views-counter-mysiam-vs-innodb/</link>
	<description>The blog from the staff of BKWLD</description>
	<lastBuildDate>Tue, 01 May 2012 11:14:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brent</title>
		<link>http://bkwld.com/blog/2008/03/views-counter-mysiam-vs-innodb/comment-page-1/#comment-2435</link>
		<dc:creator>Brent</dc:creator>
		<pubDate>Fri, 11 Apr 2008 21:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://team.bkwld.com/2008/03/14/views-counter-mysiam-vs-innodb/#comment-2435</guid>
		<description>InnoDB is normally preferred over MyISAM. There are *some* benefits of still using MyISAM (full-text indexing for example), but overall performance is usually better with InnoDB.

I would create a DB table that has userID as a key and then a column for &quot;page views&quot; or whatever you want to call it. Then, any time some visits the page, a trivial query of: &quot;UPDATE table SET pageViews=pageViews+1 WHERE userID=x&quot; will give you an overall page view count.

Of course, this table scheme wouldn&#039;t let you break-down stats like hourly/daily/weeky/monthly visit count. For something like that, you would definitely need to insert a new row with a timestamp and optionally an IP (to calculate unique visits) for each visit.</description>
		<content:encoded><![CDATA[<p>InnoDB is normally preferred over MyISAM. There are *some* benefits of still using MyISAM (full-text indexing for example), but overall performance is usually better with InnoDB.</p>
<p>I would create a DB table that has userID as a key and then a column for &#8220;page views&#8221; or whatever you want to call it. Then, any time some visits the page, a trivial query of: &#8220;UPDATE table SET pageViews=pageViews+1 WHERE userID=x&#8221; will give you an overall page view count.</p>
<p>Of course, this table scheme wouldn&#8217;t let you break-down stats like hourly/daily/weeky/monthly visit count. For something like that, you would definitely need to insert a new row with a timestamp and optionally an IP (to calculate unique visits) for each visit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordan</title>
		<link>http://bkwld.com/blog/2008/03/views-counter-mysiam-vs-innodb/comment-page-1/#comment-2251</link>
		<dc:creator>Jordan</dc:creator>
		<pubDate>Mon, 17 Mar 2008 06:00:32 +0000</pubDate>
		<guid isPermaLink="false">http://team.bkwld.com/2008/03/14/views-counter-mysiam-vs-innodb/#comment-2251</guid>
		<description>So are you caching this information at all?

What if you did a daily cache and then only added the views from that day... or something similar? Then take the daily views and dump them into the cache when you start a new day. 

Just a thought.</description>
		<content:encoded><![CDATA[<p>So are you caching this information at all?</p>
<p>What if you did a daily cache and then only added the views from that day&#8230; or something similar? Then take the daily views and dump them into the cache when you start a new day. </p>
<p>Just a thought.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://bkwld.com/blog/2008/03/views-counter-mysiam-vs-innodb/comment-page-1/#comment-2249</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sun, 16 Mar 2008 18:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://team.bkwld.com/2008/03/14/views-counter-mysiam-vs-innodb/#comment-2249</guid>
		<description>What if you do both? On each profile view event, you could insert the new record into the MySIAM table and increment the count in the InnoDB table.  Use the InnoDB for displaying totals and the MySIAM for tracking views over time. 

It may cause bottlnecks on the ohtjer side, but it might be worth checking out.</description>
		<content:encoded><![CDATA[<p>What if you do both? On each profile view event, you could insert the new record into the MySIAM table and increment the count in the InnoDB table.  Use the InnoDB for displaying totals and the MySIAM for tracking views over time. </p>
<p>It may cause bottlnecks on the ohtjer side, but it might be worth checking out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://bkwld.com/blog/2008/03/views-counter-mysiam-vs-innodb/comment-page-1/#comment-2215</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Fri, 14 Mar 2008 22:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://team.bkwld.com/2008/03/14/views-counter-mysiam-vs-innodb/#comment-2215</guid>
		<description>I kept messing with it and if a user has 100 views it was taking like .001 seconds.  If they have closer to 100,000, it takes around .1 seconds to the count.  That&#039;s getting to scary territory.  I&#039;m gonna hedge on most users not being that popular.</description>
		<content:encoded><![CDATA[<p>I kept messing with it and if a user has 100 views it was taking like .001 seconds.  If they have closer to 100,000, it takes around .1 seconds to the count.  That&#8217;s getting to scary territory.  I&#8217;m gonna hedge on most users not being that popular.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

