<?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"
	>
<channel>
	<title>Comments on: Easy MySQL Performance Tips</title>
	<atom:link href="http://maisonbisson.com/blog/post/11796/easy-mysql-performance-tips/feed" rel="self" type="application/rss+xml" />
	<link>http://maisonbisson.com/blog/post/11796/easy-mysql-performance-tips/</link>
	<description>A bunch of stuff I would have emailed you about.</description>
	<pubDate>Mon, 13 Oct 2008 14:44:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Nick</title>
		<link>http://maisonbisson.com/blog/post/11796/easy-mysql-performance-tips/#comment-193415</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Mon, 28 Apr 2008 14:47:39 +0000</pubDate>
		<guid isPermaLink="false">http://maisonbisson.com/blog/post/11796/#easy-mysql-performance-tips#comment-193415</guid>
		<description>Unfortunately you are incorrect with regards to count(*); Zach's article is correct. 

Why? count(*) is optimised by MySQL. The table descriptor is used without the need to read any table records in the case of count star with no where condition, and an index is used if possible if there is a where condition.  Doing a count on an appropriately indexed column is fine too, as Zach notes, however there is the risk that should the choice of indices be changed in the future that the counted column is no longer optimal and there is then a big hit that may go unnoticed. So count(*) SHOULD be used.

It is fair to say that selecting of * is generally a bad idea for queries that return rows as most often then returns more data than is needed, taking more time in the process. For non performance critical queries using * is arguably OK and has advantages of reduced maintenance.

Using * during early stages of development may be justified on the basis that it may speed development if the database schema is still in flux. Doing so avoids the need to revise queries changing column names, deleting unused columns and adding new columns or ones that were forgotten. Once stable and before an application is released and finally tested, a code review should tidy up the queries.

Nick</description>
		<content:encoded><![CDATA[<p>Unfortunately you are incorrect with regards to count(*); Zach&#8217;s article is correct. </p>
<p>Why? count(*) is optimised by MySQL. The table descriptor is used without the need to read any table records in the case of count star with no where condition, and an index is used if possible if there is a where condition.  Doing a count on an appropriately indexed column is fine too, as Zach notes, however there is the risk that should the choice of indices be changed in the future that the counted column is no longer optimal and there is then a big hit that may go unnoticed. So count(*) SHOULD be used.</p>
<p>It is fair to say that selecting of * is generally a bad idea for queries that return rows as most often then returns more data than is needed, taking more time in the process. For non performance critical queries using * is arguably OK and has advantages of reduced maintenance.</p>
<p>Using * during early stages of development may be justified on the basis that it may speed development if the database schema is still in flux. Doing so avoids the need to revise queries changing column names, deleting unused columns and adding new columns or ones that were forgotten. Once stable and before an application is released and finally tested, a code review should tidy up the queries.</p>
<p>Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: priyank</title>
		<link>http://maisonbisson.com/blog/post/11796/easy-mysql-performance-tips/#comment-189455</link>
		<dc:creator>priyank</dc:creator>
		<pubDate>Wed, 06 Feb 2008 07:22:50 +0000</pubDate>
		<guid isPermaLink="false">http://maisonbisson.com/blog/post/11796/#easy-mysql-performance-tips#comment-189455</guid>
		<description>Good</description>
		<content:encoded><![CDATA[<p>Good</p>
]]></content:encoded>
	</item>
</channel>
</rss>