<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Data-Diggers.com &#187; screencast</title>
	<atom:link href="http://www.data-diggers.com/index.php/tag/screencast/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.data-diggers.com</link>
	<description>Zen Cart Optimization, Performance and A/B Split Testing Modules for Zen Cart</description>
	<lastBuildDate>Mon, 24 May 2010 18:56:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Query Log Released</title>
		<link>http://www.data-diggers.com/index.php/2008/12/query-log-released/</link>
		<comments>http://www.data-diggers.com/index.php/2008/12/query-log-released/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 12:12:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Query Log]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[Zen Cart]]></category>

		<guid isPermaLink="false">http://www.data-diggers.eu/?p=21</guid>
		<description><![CDATA[
			
				
			
		
Query Log for Zen Cart is open source, simple tool for monitoring performance of SQL queries. Depending on configuration it will display or save all executed queries sent to database together with information how much time each query took and which page and session executed it. With Query Log and some SQL knowledge You can [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.data-diggers.com%2Findex.php%2F2008%2F12%2Fquery-log-released%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.data-diggers.com%2Findex.php%2F2008%2F12%2Fquery-log-released%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: justify;"><strong>Query Log for Zen Cart</strong> is open source, simple tool for monitoring performance of SQL queries. Depending on configuration it will display or save all executed queries sent to database together with information how much time each query took and which page and session executed it. With Query Log and some SQL knowledge You can improve performance of Your Zen Cart store.</p>
<p style="text-align: justify;">At this moment there are two components:</p>
<ul style="text-align: justify;">
<li>Basic Logger &#8211; it&#8217;ll display to trusted users all logged queries in Zen Cart shop footer.</li>
<li>Database Logger &#8211; it&#8217;ll save all logged queries to database.</li>
</ul>
<h2 style="text-align: justify;"><strong>Demo Stores</strong></h2>
<p style="text-align: justify;">Because Database Logger does not display anything to users no demo store is available for it.</p>
<p style="text-align: justify;">Here&#8217;s demo store for Basic Logger: <a rel="nofollow" href="http://www.data-diggers.com/contribs/query-log/demo-stores/with-query-log">Basic Logger Demo Store</a></p>
<h2 style="text-align: justify;"><strong>Basic Logger</strong></h2>
<p style="text-align: justify;">Basic Logger for each page request logs all queries sent to database and displays them to trusted users in page footer together with time each query took. It will mark with red color queries that take much more time then average. See <a href="http://www.data-diggers.com/query-log#screencast">screencast</a> to see it in action.</p>
<p style="text-align: justify;"><strong>Note:</strong> Basic Logger is based on contribution made by Chemo for osCommerce, We just added few features to it.</p>
<h2 style="text-align: justify;"><strong>Database Logger</strong></h2>
<p style="text-align: justify;">Database Logger does everything that Basic Logger do. In addition it also saves all queries from all page requests of all visitors in database table. You can then execute various queries to check which queries should be optimized, which pages generates most queries, what is average time spent in database etc.</p>
<p style="text-align: justify;">Database Logger is as fast as possible, it uses MyISAM tables without primary key and indexes to store queries (this means that MySQL server does not spend time updating lookup tables). Also, if MySQL ver. 5.0 or later is available You can use Archive storage engine to compress logs (installation script provides two versions of sql patches, one for MySQL ver. 5.0 or later, and one for earlier versions).</p>
<p style="text-align: justify;"><strong>Warning</strong>: before turning on Database Logger make sure that You know what You&#8217;re doing. Storing all queries in database can take <strong>huge</strong> amounts of disk space.</p>
<p style="text-align: justify;">You can do various things with query_log table, below are few simple use cases.</p>
<p style="text-align: justify;">To list slowest queries execute:</p>
<div class="codesnip-container" >
<div class="sql codesnip" style="font-family:monospace;"><span class="kw1">SELECT</span> <span class="sy0">*</span><br />
<span class="kw1">FROM</span> query_log<br />
<span class="kw1">ORDER</span> <span class="kw1">BY</span> time <span class="kw1">DESC</span><br />
<span class="kw1">LIMIT</span> <span class="nu0">100</span></div>
</div>
<p style="text-align: justify;">You can check what is average time spent in database for each type of page (product_info, index, advanced_search_results etc.):</p>
<div style="text-align: justify;">
<div class="codesnip-container" >
<div class="sql codesnip" style="font-family:monospace;"><span class="kw1">SELECT</span> page<span class="sy0">,</span> AVG<span class="br0">&#40;</span>time<span class="br0">&#41;</span> <span class="kw1">AS</span> <span class="st0">&#8216;average_time&#8217;</span><br />
<span class="kw1">FROM</span> query_log<br />
<span class="kw1">GROUP</span> <span class="kw1">BY</span> page<br />
<span class="kw1">ORDER</span> <span class="kw1">BY</span> average_time <span class="kw1">DESC</span></div>
</div>
</div>
<p style="text-align: justify;">Listing queries executed on &#8216;product_info&#8217; page that takes more then 0.1 sec to complete:</p>
<div style="text-align: justify;">
<div class="codesnip-container" >
<div class="sql codesnip" style="font-family:monospace;"><span class="kw1">SELECT</span> <span class="sy0">*</span><br />
<span class="kw1">FROM</span> query_log<br />
<span class="kw1">WHERE</span> page <span class="sy0">=</span> <span class="st0">&#8216;product_info&#8217;</span><br />
<span class="kw1">AND</span> time <span class="sy0">&gt;=</span> <span class="nu0">0.1</span></div>
</div>
</div>
<h2 style="text-align: justify;"><strong><a name="screencast"></a>Screencast</strong></h2>
<p style="text-align: justify;">Here&#8217;s screencast showing how to install and use Query Log:</p>
<p style="text-align: center;"><a href="http://www.data-diggers.com/contribs/query-log/screencasts/installation/installation.html" target="_blank"><img src="http://www.data-diggers.com/contribs/query-log/screencasts/installation/thumb.jpg" border="0" alt="" /></a></p>
<h2 style="text-align: justify;"><strong>Download</strong></h2>
<p style="text-align: justify;">Here You can download Query Log compatible with all 1.3.x Zen Cart versions.</p>
<p style="text-align: justify;"><a href="http://www.data-diggers.com/contribs/query-log/downloads/querylog-current.zip"><strong><em>Download Query Log</em></strong></a></p>
<h2 style="text-align: justify;"><strong>Installation</strong></h2>
<p style="text-align: justify;">Requirements:</p>
<ul style="text-align: justify;">
<li>You can use Query Log with any version of Zen Cart 1.3.x.</li>
<li>PHP &gt;= 4.x is required.</li>
<li><a href="http://www.data-diggers.com/query-cache">Query Cache</a> is required. If You don&#8217;t want to use Query Cache You have to change <em>includes/classes/db/mysql/query_factory.php</em> to use Query Log</li>
</ul>
<p style="text-align: justify;">Query Log is quite easy to install. First You need to download it. After that extract it with Winzip or something similar and follow instructions below:</p>
<ol style="text-align: justify;">
<li>BACKUP BACKUP BACKUP!</li>
<li>Upload &#8216;includes&#8217; directory (from directory corresponding to Your Zen Cart version) on Your server (via ftp, sftp or any other protocol).</li>
<li>If You use MySQL &gt;=5.0 copy and paste contents of sql_patch_for_mysql_5.x.sql into Store Admin Panel -&gt; Tools -&gt; Install SQL Patches. Execute the script.</li>
<li>If You use MySQL &lt;5.0 copy and paste contents of sql_patch.sql into Store Admin Panel -&gt; Tools -&gt; Install SQL Patches. Execute the script.</li>
<li>Done.</li>
</ol>
<p style="text-align: justify;">If You use custom template add following line to proper tpl_main_page.php somewhere near end of the file:</p>
<div style="text-align: justify;">
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw2">&lt;?php</span> display_query_log<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></div>
</div>
</div>
<p style="text-align: justify;">After installation You&#8217;ll need to configure Query Log.</p>
<h2 style="text-align: justify;"><strong>Configuration</strong></h2>
<p style="text-align: justify;">Query Log adds three options to Admin Panel -&gt; Configuration -&gt; Logging:</p>
<ul style="text-align: justify;">
<li>Enable Database Query Log</li>
<li>Display queries to trusted users</li>
<li>Display queries to users with following email addresses (list of trusted users</li>
</ul>
<h3 style="text-align: justify;"><em>Enable Database Query Log</em></h3>
<p style="text-align: justify;">When enabled <strong>all </strong>logged queries will be saved in database in <strong>query_log</strong> table.</p>
<h3 style="text-align: justify;"><em>Display queries to trusted users</em></h3>
<p style="text-align: justify;">Enables Basic Logger. It will display queries only to logged in users with email addresses listed in <em>Display queries to users with following email addresses</em></p>
<h3 style="text-align: justify;"><em>Display queries to users with following email addresses</em></h3>
<p style="text-align: justify;">Comma separated list of emails.</p>
<h2 style="text-align: justify;"><strong>Stay in touch</strong></h2>
<p style="text-align: justify;">If You wish to be notified about new versions of Query Log, use cases, new screen casts or anything else related to Query Log type Your email address below hit &#8216;Subscribe&#8217;. You will only receive news regarding this contribution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.data-diggers.com/index.php/2008/12/query-log-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Query Cache for Zen Cart released</title>
		<link>http://www.data-diggers.com/index.php/2008/12/query-cache-for-zen-cart-released/</link>
		<comments>http://www.data-diggers.com/index.php/2008/12/query-cache-for-zen-cart-released/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 22:43:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Query Cache]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[Speed]]></category>
		<category><![CDATA[Zen Cart]]></category>

		<guid isPermaLink="false">http://www.data-diggers.eu/?p=3</guid>
		<description><![CDATA[
			
				
			
		
Update: Query Cache V1.6 has been released &#8211; read here
Query Cache is free, in memory cache designed to work with Zen Cart. It can reduce number of queries sent to database by over 80% (see charts below). Thus, Query Cache  might greatly reduce query execution time and response time of most Zen Cart stores.
You might [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.data-diggers.com%2Findex.php%2F2008%2F12%2Fquery-cache-for-zen-cart-released%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.data-diggers.com%2Findex.php%2F2008%2F12%2Fquery-cache-for-zen-cart-released%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: justify;"><strong>Update</strong>: Query Cache V1.6 has been released &#8211; <a href="http://www.data-diggers.com/query-cache-v1.6-released">read here</a></p>
<p style="text-align: justify;"><strong>Query Cache</strong> is free, in memory cache designed to work with Zen Cart. It can reduce number of queries sent to database by over 80% (see charts below). Thus, Query Cache  might greatly reduce query execution time and response time of most Zen Cart stores.</p>
<p style="text-align: justify;">You might want to jump quickly to see <a href="http://www.data-diggers.com/sites/all/modules/fckeditor/fckeditor/editor/fckeditor.html?InstanceName=oFCK_1&amp;Toolbar=Default#Demo_Stores">Demo Stores</a>. Compare number of queries on each store.</p>
<h2 style="text-align: justify;"><strong>Performance Analysis</strong></h2>
<p style="text-align: justify;">We&#8217;ve ran some tests on demo installment of Zen Cart 1.3.8a which contains just a few products, few categories, one customer and no orders. Still, Zen Cart generated over nine hundred queries (&gt;900!) just to load first page of the demo store (You can check how many queries generates Your store by turning on &#8216;Display Page Parse Time&#8217;, <a href="http://www.data-diggers.com/sites/all/modules/fckeditor/fckeditor/editor/fckeditor.html?InstanceName=oFCK_1&amp;Toolbar=Default#Verify">read more</a>). After that, Query Cache has been installed and it managed to reduce number of queries by half (from 900 to 199 queries approx.).</p>
<p style="text-align: justify;">Other pages where also checked, including: category view page, search results page and &#8217;static&#8217; (more or less) shipping information page. Results are presented on figures below:</p>
<table style="text-align: justify;" border="0" cellspacing="1" cellpadding="1" width="100%">
<tbody>
<tr>
<td align="center" valign="middle"><a rel="lightbox[query-cache]" href="http://www.data-diggers.com/contribs/query-cache/images/home_page.jpg"><img src="http://www.data-diggers.com/contribs/query-cache/images/home_page.jpg" alt="" width="250" height="193" /></a></td>
<td align="center" valign="middle"><a rel="lightbox[query-cache]" href="http://www.data-diggers.com/contribs/query-cache/images/category.jpg"><img src="http://www.data-diggers.com/contribs/query-cache/images/category.jpg" alt="" width="250" height="193" /></a></td>
</tr>
<tr>
<td align="center" valign="middle"><a rel="lightbox[query-cache]" href="http://www.data-diggers.com/contribs/query-cache/images/search_results_new.jpg"><img src="http://www.data-diggers.com/contribs/query-cache/images/search_results_new.jpg" alt="" width="250" height="193" /></a></td>
<td align="center" valign="middle"><a rel="lightbox[query-cache]" href="http://www.data-diggers.com/contribs/query-cache/images/shipping.jpg"><img src="http://www.data-diggers.com/contribs/query-cache/images/shipping.jpg" alt="" width="250" height="193" /></a></td>
</tr>
</tbody>
</table>
<h2 style="text-align: justify;"><strong>Advantages of Query Cache</strong></h2>
<ul style="text-align: justify;">
<li>reduces number of queries sent to database by 80%</li>
<li>it&#8217;s very easy to install (jump to <a href="http://www.data-diggers.com/sites/all/modules/fckeditor/fckeditor/editor/fckeditor.html?InstanceName=oFCK_1&amp;Toolbar=Default#Installation_Instructions">Installation instructions)</a></li>
<li>reduces page generation time, reduces load on database server.</li>
<li>works with all 1.3.x versions of Zen Cart</li>
</ul>
<h2 style="text-align: justify;"><strong>Disadvantages of Query Cache</strong></h2>
<p style="text-align: justify;">As far as We can tell there is only one disadvantage: at this moment Query Cache can&#8217;t detect if database has been changed while php script is running. This means that if, for example, information about product is pulled from database, then product is updated, and retrieved again from database (<strong>all happening in one request</strong>) updated information might not be retrieved (in next request information will be updated).</p>
<h2 style="text-align: justify;"><a name="Download"></a><strong>Download</strong></h2>
<p style="text-align: justify;">Here is package including Query Cache for <strong>ALL</strong> versions of Zen Cart 1.3.x:</p>
<p style="text-align: center;"><a href="http://www.data-diggers.com/contribs/query-cache/downloads/querycache-current.zip"><span style="font-size: larger;"><strong><em>Download Query Cache &#8211; latest version<br />
</em></strong></span></a></p>
<h2 style="text-align: justify;"><a name="Installation_Instructions"></a><strong>Installation Instructions</strong></h2>
<p style="text-align: justify;">First, download contribution <a href="http://www.data-diggers.com/sites/all/modules/fckeditor/fckeditor/editor/fckeditor.html?InstanceName=oFCK_1&amp;Toolbar=Default#Download">here</a>. Extract it with WinZip or something similar. Go to extracted directory. There are few directories named like &#8216;Zen-Cart 1.3.x&#8217; where &#8216;x&#8217; is minor version number of Zen Cart. To install this module:</p>
<ol style="text-align: justify;">
<li>BACKUP BACKUP BACKUP!</li>
<li>Upload &#8216;includes&#8217; directory (from directory corresponding to Your Zen Cart version) on Your server (via ftp, sftp or any other protocol).</li>
<li>Done.</li>
</ol>
<p style="text-align: justify;"><em><strong>Note:</strong></em> Query Cache v1.5 has feature that might slow down Your store if Your web server is <strong>very </strong>slow. In such case You can try to set <em>QC_USE_PRODUCT_QUERY_DETECTION</em> in includes/extra_configures/query_cache.php to FALSE.<br />
This contribution is preconfigured to use <strong>Query Log</strong> _IF_ it&#8217;s available. If Query Log is not installed, Query Cache will still work without any problems (or at least it should;)</p>
<h2 style="text-align: justify;"><a name="Verify"></a> <strong>How to verify that Query Cache Works</strong></h2>
<h1 style="text-align: justify;"><strong> </strong></h1>
<p style="text-align: justify;">Before installing Query Cache check how many queries Your store executes:</p>
<ul style="text-align: justify;">
<li>Enable &#8216;Display The Page Parse Time&#8217; option in Store Admin in Configuration -&gt; Logging.</li>
<li>Go to Your store, scroll down and see how many queries where executed.</li>
</ul>
<p style="text-align: justify;">Now, install Query Cache and visit the same page. Check query count, it should be much lower.</p>
<h2 style="text-align: justify;"><strong>Screencast</strong></h2>
<p style="text-align: justify;">Here is screencast showing how to install this contribution.</p>
<p style="text-align: center;"><a href="http://www.data-diggers.com/contribs/query-cache/screencasts/installation/querycache.html" target="_blank"><img src="http://www.data-diggers.com/contribs/query-cache/screencasts/installation/thumb.jpg" border="0" alt="" /></a></p>
<h2 style="text-align: justify;"><strong><a name="Demo_Stores"></a>Demo Stores</strong></h2>
<p style="text-align: justify;">Here are two Demo Stores:</p>
<p style="text-align: justify;"><a rel="nofollow" href="http://www.data-diggers.com/contribs/query-cache/demo-stores/with-query-cache/">Demo Store with Query Cache installed</a></p>
<p style="text-align: justify;"><a rel="nofollow" href="http://www.data-diggers.com/contribs/query-cache/demo-stores/without-query-cache/">Demo Store without Query Cache installed</a></p>
<p style="text-align: justify;">Take a look at footer of each store. As You can see Query Cache greatly reduced number of executed queries.</p>
<h2 style="text-align: justify;"><strong>Is it free? (Yes)</strong></h2>
<p style="text-align: justify;">Yes, it is. You can use it on unlimited number of sites without any costs. You can redistribute it, change the source code (but leave us as original authors) etc. You can&#8217;t sell it or make any profit of it.</p>
<h2 style="text-align: justify;"><strong>Stay in touch<br />
</strong></h2>
<p style="text-align: justify;">We plan to release new version of Query Cache soon, with some new features that will further reduce number of executed queries and improve performance of Your store. Just type Your address here to be notified of new versions of Query Cache (You&#8217;ll receive only updates on Query Cache). Quick info: We hate spam, Your email will not be given to anyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.data-diggers.com/index.php/2008/12/query-cache-for-zen-cart-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
