<?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: Enable Logging of Slow Queries (Slow Query Log) in MySQL Database</title>
	<atom:link href="http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/</link>
	<description>Living Digitally and Electronically</description>
	<lastBuildDate>Sat, 14 Nov 2009 17:41:21 +0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: kain</title>
		<link>http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/comment-page-1/#comment-587016</link>
		<dc:creator>kain</dc:creator>
		<pubDate>Fri, 17 Jul 2009 18:23:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/#comment-587016</guid>
		<description>when you go to my.cf you will see that by default the lines

log_slow_queries = /var/log/mysql/mysql-slow.log &amp;
long_query_time = 1

are commented out, however, the next line 

log-queries-not-using-indexes 

is not, so if you enable slow query logging then by default all queries not using indexes will show up in that log.  For most DBs this will be a ton of data which is why your logs are filling up so quickly.

My suggestion is comment out this line

log-queries-not-using-indexes

and change the long_query_time value to something low like 1 or 2, this should give you some meaningful results with which to start from.

If you still get no results it might be that you have no slow queries in which case you should uncomment out the line 

log-queries-not-using-indexes

and start trying to index some of those queries.

hope that helps someone

-Kain</description>
		<content:encoded><![CDATA[<p>when you go to my.cf you will see that by default the lines</p>
<p>log_slow_queries = /var/log/mysql/mysql-slow.log &amp;<br />
long_query_time = 1</p>
<p>are commented out, however, the next line </p>
<p>log-queries-not-using-indexes </p>
<p>is not, so if you enable slow query logging then by default all queries not using indexes will show up in that log.  For most DBs this will be a ton of data which is why your logs are filling up so quickly.</p>
<p>My suggestion is comment out this line</p>
<p>log-queries-not-using-indexes</p>
<p>and change the long_query_time value to something low like 1 or 2, this should give you some meaningful results with which to start from.</p>
<p>If you still get no results it might be that you have no slow queries in which case you should uncomment out the line </p>
<p>log-queries-not-using-indexes</p>
<p>and start trying to index some of those queries.</p>
<p>hope that helps someone</p>
<p>-Kain</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nolan</title>
		<link>http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/comment-page-1/#comment-561668</link>
		<dc:creator>Robert Nolan</dc:creator>
		<pubDate>Fri, 20 Feb 2009 13:29:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/#comment-561668</guid>
		<description>I use MONyog Query analyzer to analyze slow queries. It works flawlessly.</description>
		<content:encoded><![CDATA[<p>I use MONyog Query analyzer to analyze slow queries. It works flawlessly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Commander1024</title>
		<link>http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/comment-page-1/#comment-548612</link>
		<dc:creator>Commander1024</dc:creator>
		<pubDate>Fri, 19 Dec 2008 11:37:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/#comment-548612</guid>
		<description>I can&#039;t really confirm this - I enabled slow loggin in the appropiate config file (debian lenny, mysql 5.0 latest) because I HAD &quot;some&quot; slow queries before.
After enabling there are thousands of &quot;slow queries&quot; being logged - The slow limit is set to the default of 10 sec. This is really nonsense as there can&#039;t be a &gt;10sec query when the whole page is being calculated, by php, tranferred over the net and rendered on the client browser in under 5 sec

greetings Marcus</description>
		<content:encoded><![CDATA[<p>I can&#8217;t really confirm this &#8211; I enabled slow loggin in the appropiate config file (debian lenny, mysql 5.0 latest) because I HAD &#8220;some&#8221; slow queries before.<br />
After enabling there are thousands of &#8220;slow queries&#8221; being logged &#8211; The slow limit is set to the default of 10 sec. This is really nonsense as there can&#8217;t be a &gt;10sec query when the whole page is being calculated, by php, tranferred over the net and rendered on the client browser in under 5 sec</p>
<p>greetings Marcus</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: misrnt</title>
		<link>http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/comment-page-1/#comment-538975</link>
		<dc:creator>misrnt</dc:creator>
		<pubDate>Sat, 01 Nov 2008 10:48:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/#comment-538975</guid>
		<description>i try to do that but this message appeared 

081101  5:34:51 [ERROR] Fatal error: Please read &quot;Security&quot; section of the manual to find out how to run mysqld as root!

081101  5:34:51 [ERROR] Aborting

081101  5:34:51 [Note] mysqld: Shutdown complete

what should i do in this case?</description>
		<content:encoded><![CDATA[<p>i try to do that but this message appeared </p>
<p>081101  5:34:51 [ERROR] Fatal error: Please read &#8220;Security&#8221; section of the manual to find out how to run mysqld as root!</p>
<p>081101  5:34:51 [ERROR] Aborting</p>
<p>081101  5:34:51 [Note] mysqld: Shutdown complete</p>
<p>what should i do in this case?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Change or Set MySQL Long Query Time Value for log-slow-queries &#187; My Digital Life</title>
		<link>http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/comment-page-1/#comment-88763</link>
		<dc:creator>Change or Set MySQL Long Query Time Value for log-slow-queries &#187; My Digital Life</dc:creator>
		<pubDate>Mon, 22 Jan 2007 16:22:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/#comment-88763</guid>
		<description>[...] If you enable slow queries log of MySQL database server, you will notice that from the slow query log file contains only SQL statements and queries that took more than query_time of 10 seconds to execute or run. This is the default value or query time threshold for log_slow_queries function, which is 10 seconds. 10 seconds is way too long for a SQL query to complete, so the value may be too high to capture any meaningful data. You can alter or change the slow query time to lower value or number of seconds.  You can set a new long_query_time in the MySQL configuration file, namely my.cnf or my.ini, normally located in /etc directory. Simply add the following line to the configuration file: [...]</description>
		<content:encoded><![CDATA[<p>[...] If you enable slow queries log of MySQL database server, you will notice that from the slow query log file contains only SQL statements and queries that took more than query_time of 10 seconds to execute or run. This is the default value or query time threshold for log_slow_queries function, which is 10 seconds. 10 seconds is way too long for a SQL query to complete, so the value may be too high to capture any meaningful data. You can alter or change the slow query time to lower value or number of seconds.  You can set a new long_query_time in the MySQL configuration file, namely my.cnf or my.ini, normally located in /etc directory. Simply add the following line to the configuration file: [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
