<?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: Beware of running ANALYZE in Production</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/</link>
	<description>Percona&#039;s MySQL &#38; InnoDB performance and scalability blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:45:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351836</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Thu, 04 Sep 2008 17:27:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351836</guid>
		<description>Tobias,

No there is no such command though being able to reset the stats would be helpful for some cases indeed.</description>
		<content:encoded><![CDATA[<p>Tobias,</p>
<p>No there is no such command though being able to reset the stats would be helpful for some cases indeed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351811</link>
		<dc:creator>Tobias</dc:creator>
		<pubDate>Thu, 04 Sep 2008 15:55:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351811</guid>
		<description>Can you modify or delete the statistics after analyze table was running? (I only use Innodb.)
Would be an appropriate method of taking influence on execution plan. (I&#039;ve done several times in Oracle.)</description>
		<content:encoded><![CDATA[<p>Can you modify or delete the statistics after analyze table was running? (I only use Innodb.)<br />
Would be an appropriate method of taking influence on execution plan. (I&#8217;ve done several times in Oracle.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351590</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Wed, 03 Sep 2008 17:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351590</guid>
		<description>Pat,

Sure. You run ANALYZE if your data changed or may be after your loaded data with bunch of inserts (as there will be no cardinality info in the table in this case).   MySQL does not use ANALYZE stats at all for many simple queries.   MySQL also does not store any &quot;skew&quot; information which optimizer could use.</description>
		<content:encoded><![CDATA[<p>Pat,</p>
<p>Sure. You run ANALYZE if your data changed or may be after your loaded data with bunch of inserts (as there will be no cardinality info in the table in this case).   MySQL does not use ANALYZE stats at all for many simple queries.   MySQL also does not store any &#8220;skew&#8221; information which optimizer could use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351588</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Wed, 03 Sep 2008 17:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351588</guid>
		<description>Sheeri,

Sure the usefulness of ANALYZE is often overestimated and I frequently catch people doing ANALYZE much more frequently when they need. Analyze also works differently for MyISAM and Innodb - for Innodb it is &quot;10 random dives&quot; so it is very approximate for MyISAM it is index scan so it is possible to have accurate data though as table can be changed the next second being 100% exact is not the goal for ANALYZE.</description>
		<content:encoded><![CDATA[<p>Sheeri,</p>
<p>Sure the usefulness of ANALYZE is often overestimated and I frequently catch people doing ANALYZE much more frequently when they need. Analyze also works differently for MyISAM and Innodb &#8211; for Innodb it is &#8220;10 random dives&#8221; so it is very approximate for MyISAM it is index scan so it is possible to have accurate data though as table can be changed the next second being 100% exact is not the goal for ANALYZE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351587</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Wed, 03 Sep 2008 17:16:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351587</guid>
		<description>Rob,

Analyze does not really have anything to do with Auto Increment handling.  Innodb may forget some values it gave out already after restart but this is design implication.</description>
		<content:encoded><![CDATA[<p>Rob,</p>
<p>Analyze does not really have anything to do with Auto Increment handling.  Innodb may forget some values it gave out already after restart but this is design implication.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351557</link>
		<dc:creator>Pat</dc:creator>
		<pubDate>Wed, 03 Sep 2008 15:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351557</guid>
		<description>When you get down to it, unless you have reason to believe your data changed &quot;shape&quot; sinificantly, there&#039;s not usually an advantage to running stats in my experience (on innodb or any other db for that matter).

Main thing the optimizers are looking for are cardinality values on your indexes and skewing. If neither of those changes appreciably, then neither will your plans and in the meantime you&#039;ll have burned up some set of server resources (and a lock) gathering stats.</description>
		<content:encoded><![CDATA[<p>When you get down to it, unless you have reason to believe your data changed &#8220;shape&#8221; sinificantly, there&#8217;s not usually an advantage to running stats in my experience (on innodb or any other db for that matter).</p>
<p>Main thing the optimizers are looking for are cardinality values on your indexes and skewing. If neither of those changes appreciably, then neither will your plans and in the meantime you&#8217;ll have burned up some set of server resources (and a lock) gathering stats.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sheeri</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351522</link>
		<dc:creator>Sheeri</dc:creator>
		<pubDate>Wed, 03 Sep 2008 11:33:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351522</guid>
		<description>Peter, from my experience ANALYZE TABLE doesn&#039;t do an exact count -- at the very least, the stats are still approximate after an ANALYZE TABLE.  That being said, it can be useful, but not as useful as some people might think.</description>
		<content:encoded><![CDATA[<p>Peter, from my experience ANALYZE TABLE doesn&#8217;t do an exact count &#8212; at the very least, the stats are still approximate after an ANALYZE TABLE.  That being said, it can be useful, but not as useful as some people might think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Wultsch</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351479</link>
		<dc:creator>Rob Wultsch</dc:creator>
		<pubDate>Wed, 03 Sep 2008 07:41:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351479</guid>
		<description>Does ANALYZE on Innodb initialize the auto-increment counter?

http://dev.mysql.com/doc/refman/5.0/en/innodb-auto-increment-handling.html

That page appears to say no, but it seem to me that something that would make sense to pull stats on when an ANALYZE is run. Any thoughts?</description>
		<content:encoded><![CDATA[<p>Does ANALYZE on Innodb initialize the auto-increment counter?</p>
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-auto-increment-handling.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/innodb-auto-increment-handling.html</a></p>
<p>That page appears to say no, but it seem to me that something that would make sense to pull stats on when an ANALYZE is run. Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351426</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Wed, 03 Sep 2008 03:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351426</guid>
		<description>Brian,

Analyze with Innodb is useful in two ways.   First  Innodb only updates stats when table is opened first time so if your MySQL server has very long uptime the statistics can become out of sync, just as with MyISAM.   Second because Innodb does not have accurate stats it is possible for query plans to break after MySQL restart (because stats are way off compared to last start) and running Analyze allows to fix it.   It is also possible for multiple slaves to have different stats and so plans which can be fixed same silly way - by running ANALYZE until plans are same.</description>
		<content:encoded><![CDATA[<p>Brian,</p>
<p>Analyze with Innodb is useful in two ways.   First  Innodb only updates stats when table is opened first time so if your MySQL server has very long uptime the statistics can become out of sync, just as with MyISAM.   Second because Innodb does not have accurate stats it is possible for query plans to break after MySQL restart (because stats are way off compared to last start) and running Analyze allows to fix it.   It is also possible for multiple slaves to have different stats and so plans which can be fixed same silly way &#8211; by running ANALYZE until plans are same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Aker</title>
		<link>http://www.mysqlperformanceblog.com/2008/09/02/beware-of-running-analyze-in-production/comment-page-1/#comment-351327</link>
		<dc:creator>Brian Aker</dc:creator>
		<pubDate>Tue, 02 Sep 2008 23:55:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=484#comment-351327</guid>
		<description>How useful is Analyze with Innodb?</description>
		<content:encoded><![CDATA[<p>How useful is Analyze with Innodb?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

