<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
>

<channel>
	<title>theMySQLGuy Podcast</title>
	<atom:link href="http://www.themysqlguy.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.themysqlguy.com</link>
	<description>Welcome to the theMySQLguy.com podcast.  This is where you can get all kinds of useful information about MySQL.  We will cover intermediate to advanced issues.  So the assumption is that you have MySQL installed and running.</description>
	<lastBuildDate>Tue, 02 Jun 2009 04:08:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<!-- podcast_generator="Blubrry PowerPress/1.0.9" mode="simple" entry="simple" -->
	<itunes:summary>Welcome to the theMySQLguy.com podcast.  This is where you can get all kinds of useful information about MySQL.  We will cover intermediate to advanced issues.  So the assumption is that you have MySQL installed and running.</itunes:summary>
	<itunes:author>Christos Kalantzis</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://www.themysqlguy.com/wp-content/uploads/theMySQLGuySquare300.jpg" />
	<itunes:owner>
		<itunes:name>Christos Kalantzis</itunes:name>
		<itunes:email>christos@themysqlguy.com</itunes:email>
	</itunes:owner>
	<managingEditor>christos@themysqlguy.com (Christos Kalantzis)</managingEditor>
	<copyright>2006-2009</copyright>
	<itunes:subtitle>Welcome to the theMySQLguy.com podcast.  This is where you can get all kinds of useful information about MySQL.  We will cover intermediate to advanced issues.  So the assumption is that you have MySQL installed and running.</itunes:subtitle>
	<itunes:keywords>mysql, database, open source, development</itunes:keywords>
	<image>
		<title>theMySQLGuy Podcast</title>
		<url>http://www.themysqlguy.com/wp-content/uploads/theMySQLGuySquare144.jpg</url>
		<link>http://www.themysqlguy.com</link>
	</image>
	<itunes:category text="Technology">
		<itunes:category text="Podcasting" />
		<itunes:category text="Software How-To" />
	</itunes:category>
		<item>
		<title>I am Presenting at MySQL Camp 2009</title>
		<link>http://www.themysqlguy.com/?p=42</link>
		<comments>http://www.themysqlguy.com/?p=42#comments</comments>
		<pubDate>Tue, 21 Apr 2009 16:42:41 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[From me to you]]></category>
		<category><![CDATA[mysqlconf]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=42</guid>
		<description><![CDATA[Come join me at MySQL Camp 2009. I will be presenting how to run multiple instances of MySQL, on one installation. The Hyatt Regency Santa Clara 5101 Great America Parkway Santa Clara, CA 95054 USA April 22, 2009 11:55 am &#8211; 12:35 pm Presentation Schedule]]></description>
			<content:encoded><![CDATA[<p>Come join me at MySQL Camp 2009.  I will be presenting how to run multiple instances of MySQL, on one installation.</p>
<p>The Hyatt Regency Santa Clara<br />
5101 Great America Parkway<br />
Santa Clara, CA 95054<br />
USA</p>
<p>April 22, 2009 11:55 am &#8211; 12:35 pm<br />
<a href="http://forge.mysql.com/wiki/MySQL_Camp_2009_Sessions#Wednesday_11:55_am_-_12:35_pm" target="_blank">Presentation Schedule<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=42</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Master-Master Replication. A Cluster, it is not!</title>
		<link>http://www.themysqlguy.com/?p=27</link>
		<comments>http://www.themysqlguy.com/?p=27#comments</comments>
		<pubDate>Fri, 09 Jan 2009 23:45:50 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[MySQL misc. Posts]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=27</guid>
		<description><![CDATA[I am continuously asked by wide-eyed green web 2.0 developers about Master-Master Replication (M-M).  Development Managers and CTOs/CIOs aren&#8217;t immune to this either.  They read a couple of posts about it, on the web, and seem to think that you can put together a couple of commodity servers, through in a Load Balancer and voila! [...]]]></description>
			<content:encoded><![CDATA[<p>I am continuously asked by wide-eyed green web 2.0 developers about Master-Master Replication (M-M).  Development Managers and CTOs/CIOs aren&#8217;t immune to this either.  They read a couple of posts about it, on the web, and seem to think that you can put together a couple of commodity servers, through in a Load Balancer and voila! Instant cluster, without the high price tag of Oracle&#8217;s RAC.</p>
<p>Unfortunately, its not that simple.  MySQL actually has a cluster product which it acquired from Ericsson.  It has some limitations. V5.0 needs to be able to have both data and index completely in memory. V5.1 needs to be able to have all index in memory.  Either later choices performs a 2 phase commit, so at anytime, querying any node with the same query, will return the same result.  In a M-M environment, depending on the load on either node, replication can be lagging, thus returning different results for the same query from each node.</p>
<p>If such a case is not handled by the application, at best, you will have inconsistent results, at worse dire results.</p>
<p>Some applications will simply not be able to use it at all.  Here is an example.  Say your DB Schema has a column that needs to be unique, however, not part of the Primary Key.  If you insert a record on one node, then insert an identical record on the second node, you will end up with two legal records on their respective nodes.  When it gets time to replicate that record in both directions, the unique constraint will make replication fail on both servers.</p>
<h2>But doesn&#8217;t it offer High-Availability?</h2>
<p>It does, if you are willing to live with a potentially inconsistent dataset after a node failure.  Remember we specified earlier that replication can lag between nodes.  If disaster strikes on one of your nodes, you have lost every transaction for the period that the other node was lagging behind the lost one.</p>
<p>The reuslt?  Your website or app is still running, however data that was previously on one server will no longer be available.  depending on your app, that could have huge consequences.</p>
<h2>So Why use it?</h2>
<p>If you could mitigate the above mentioned risks, and design your app properly, you could take advantage of M-M.  Reads would be shared between both nodes, theoretically allowing you to handle more load.  You could also pull out one node at a time, deploy possible long schema changes, rebuild indexes, etc. while the other handles the whole load, then do the same to the other.</p>
<p>I tend to stay away from M-M.  It adds an extra, often unnecessary, layer of complexity to your environment.  It does have its place, and should be part of your little bag of tricks, but only pull it out when you need to, and when it absolutely fits.  Don&#8217;t let that green PHP developper tell you he built it at home and it works, then you get stuck supporting a nightmare.  His pager isn&#8217;t going to go off at 3am&#8230;yours is!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=27</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Relaunch!</title>
		<link>http://www.themysqlguy.com/?p=24</link>
		<comments>http://www.themysqlguy.com/?p=24#comments</comments>
		<pubDate>Mon, 15 Dec 2008 17:34:31 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[Episodes]]></category>
		<category><![CDATA[relaunch]]></category>
		<category><![CDATA[themysqlguy.com]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=24</guid>
		<description><![CDATA[Hello Everyone! I have finished my move to the Bay Area (Silicon Valley) and now have more time to return to the blog.  I have learned a few new tricks as well I want to share. So&#8230;.. I am relaunching the site.  There will be a new format too.  The podcast episodes will still be [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Everyone!</p>
<p>I have finished my move to the Bay Area (Silicon Valley) and now have more time to return to the blog.  I have learned a few new tricks as well I want to share.</p>
<p>So&#8230;..</p>
<p>I am relaunching the site.  There will be a new format too.  The podcast episodes will still be published for more high level discussions, then supported by a series of blog posts.</p>
<p>I think this will be a more productive format, since most users want to hear the high level discussion and then go to the site and refer to the material.</p>
<p>Thanks for all the fish!</p>
<p>Christos</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=24</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MONyog</title>
		<link>http://www.themysqlguy.com/?p=19</link>
		<comments>http://www.themysqlguy.com/?p=19#comments</comments>
		<pubDate>Tue, 16 Sep 2008 06:03:25 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[From me to you]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[monyog]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=19</guid>
		<description><![CDATA[I just started using MONyog a month ago, and purchased it today.  I have used MySQL Enterprise Monitor for a year and a half, and although some believe its a superior product, its 5K per server per year for the Enterprise version. I bought the Unlimited Pack for $999 and that is a perpetual license [...]]]></description>
			<content:encoded><![CDATA[<p>I just started using MONyog a month ago, and purchased it today.  I have used MySQL Enterprise Monitor for a year and a half, and although some believe its a superior product, its 5K per server per year for the Enterprise version.</p>
<p>I bought the Unlimited Pack for $999 and that is a perpetual license for an unlimited amount of servers.  It gives me all the monitoring I need and without an agent installed on the MySQL server.  That makes the sys-admins I work with very happy.</p>
<p>My prefered feature is the log analyzer.  It makes analysing the slow-query-log and the general-log really easy and efficient.</p>
<p>Cool product, check it out if you can.</p>
<p>http://www.webyog.com/en/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IBM buys database software firm Solid Information</title>
		<link>http://www.themysqlguy.com/?p=17</link>
		<comments>http://www.themysqlguy.com/?p=17#comments</comments>
		<pubDate>Sat, 22 Dec 2007 01:19:34 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=17</guid>
		<description><![CDATA[International Business Machines said on Friday it has agreed to buy in-memory database software provider Solid Information Technology from private owners for an undisclosed sum. Solid&#8217;s largest owners were private equity firms Apax Partners and CapMan. Solid is expected to have 2007 sales of around $14.4 million, Vesa Wallden, a member of Solid&#8217;s board told [...]]]></description>
			<content:encoded><![CDATA[<p>International Business Machines said on Friday it has agreed to buy in-memory database software provider <a href="http://www.solidtech.com" target="_blank">Solid Information Technology</a> from private owners for an undisclosed sum. Solid&#8217;s largest owners were private equity firms Apax Partners and CapMan.</p>
<p>Solid is expected to have 2007 sales of around $14.4 million, Vesa Wallden, a member of Solid&#8217;s board told Reuters. IBM said the acquisition is expected to close in the first quarter of 2008. &#8220;IBM&#8217;s acquisition of Solid Information Technology supports the company&#8217;s growth strategy and capital allocation model, and it is expected to contribute to the achievement of the company&#8217;s objective for earnings-per-share growth through 2010,&#8221; IBM said in a statement.</p>
<p><em>Story Copyright © 2007 Reuters Limited. All rights reserved. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Episode 6 &#8211; SolidDB Storage Engine</title>
		<link>http://www.themysqlguy.com/?p=15</link>
		<comments>http://www.themysqlguy.com/?p=15#comments</comments>
		<pubDate>Thu, 15 Nov 2007 01:56:27 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[Episodes]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[soliddb]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=15</guid>
		<description><![CDATA[Recently we ran into a wall in one of my customers&#8217; sites. They built an application that processed EDI documents. Each document, contained a list of transactions. Their application would launch a thread for each transaction in the document. On the surface this sounds good and the multi-threaded approach would speed up processing of a [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: center;"><img src="http://themysqlguy.com/wp-content/uploads/2007/11/logo_solidtech.gif" alt="" width="221" height="71" /></h3>
<p>Recently we ran into a wall in one of my customers&#8217; sites. They built an application that processed EDI documents. Each document, contained a list of transactions. Their application would launch a thread for each transaction in the document. On the surface this sounds good and the multi-threaded approach would speed up processing of a document.</p>
<p>InnoDB is the only built-in transactional storage engine and unfortunately has some limitations.</p>
<pre>TX1 SET TRANSACTION ISOLATION LEVEL READ COMMITTED
TX2 SET TRANSACTION ISOLATION LEVEL READ COMMITTED
TX1 START TRANSACTION
TX2 START TRANSACTION
TX1 INSERT INTO child
TX2 INSERT INTO child (with same parent)
TX1 UPDATE parent
TX2 UPDATE parent (same parent row)</pre>
<pre>ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction</pre>
<p>We solved this issue using a third party storage engine; <a title="solidDB" href="http://www.solidtech.com" target="_blank">solidDB</a>.</p>
<p><a href="http://solutions.mysql.com/solutions/?type=29" target="_blank">Other storage engines available with MySQL</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://themysqlguy.com/wp-content/uploads/episodes/episode_06.mp3" length="4220299" type="audio/mpeg" />
			<itunes:keywords>innodb,mysql,soliddb</itunes:keywords>
		<itunes:subtitle> Recently we ran into a wall in one of my customers&#039; sites. They built an application that processed EDI documents. Each document, contained a list of transactions. Their application would launch a thread for each transaction in the document.</itunes:subtitle>
		<itunes:summary>
Recently we ran into a wall in one of my customers&#039; sites. They built an application that processed EDI documents. Each document, contained a list of transactions. Their application would launch a thread for each transaction in the document. On the surface this sounds good and the multi-threaded approach would speed up processing of a document.

InnoDB is the only built-in transactional storage engine and unfortunately has some limitations.
TX1 SET TRANSACTION ISOLATION LEVEL READ COMMITTED
TX2 SET TRANSACTION ISOLATION LEVEL READ COMMITTED
TX1 START TRANSACTION
TX2 START TRANSACTION
TX1 INSERT INTO child
TX2 INSERT INTO child (with same parent)
TX1 UPDATE parent
TX2 UPDATE parent (same parent row)
ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction
We solved this issue using a third party storage engine; solidDB.

Other storage engines available with MySQL</itunes:summary>
		<itunes:author>Christos Kalantzis</itunes:author>
		<itunes:explicit>no</itunes:explicit>
		<itunes:duration>8:47</itunes:duration>
	</item>
		<item>
		<title>Episode 5 &#8211; Federated Storage Engine</title>
		<link>http://www.themysqlguy.com/?p=14</link>
		<comments>http://www.themysqlguy.com/?p=14#comments</comments>
		<pubDate>Tue, 19 Jun 2007 21:48:06 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[Episodes]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=14</guid>
		<description><![CDATA[      Federated Storage Engine (FSE) allows you to connect to a remote server and &#8220;mount&#8221; a table on your local server, which links to the data on the remote server, for read-only access.   $ mysql -u root -ppassword -h remote mysql&#62; CREATE DATABASE test; mysql&#62; use test; mysql&#62; CREATE TABLE drivers (id [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: center;"><img src="http://themysqlguy.com/wp-content/uploads/federated.jpg" alt="" /></h3>
<p align="center"> </p>
<p align="left"> </p>
<p class="style"> </p>
<p class="paragraph_style" style="padding-top: 0pt">Federated Storage Engine (FSE) allows you to connect to a remote server and &#8220;mount&#8221; a table on your local server, which links to the data on the remote server, for read-only access.</p>
<p class="paragraph_style"> </p>
<pre>$ mysql -u root -ppassword -h remote

mysql&gt; CREATE DATABASE test;

mysql&gt; use test;

mysql&gt; CREATE TABLE drivers (id INT,name VARCHAR(100));

mysql&gt; INSERT INTO drivers (id, name) VALUES (1, ‘Chris’);

mysql&gt; INSERT INTO drivers (id, name) VALUES (2, ‘Sheeri’);

mysql&gt; INSERT INTO drivers (id, name) VALUES (3, ‘Elie’);

mysql&gt; select * from drivers;

+------+--------+
| id   | name   |
+------+--------+
|    1 | Chris  |
|    2 | Sheeri |
|    3 | Elie   |
+------+--------+
3 rows in set (0.08 sec)

mysql&gt; exit;</pre>
<pre>
$ mysql -u root -ppassword -h local

mysql&gt; CREATE DATABASE test;

mysql&gt; use test;

mysql&gt; CREATE TABLE drivers (id INT,name VARCHAR(100)) ENGINE=FEDERATED
CONNECTION=’mysql://root:password@remote:3306/test/drivers’;

mysql&gt; select * from drivers;

+------+--------+
| id   | name   |
+------+--------+
|    1 | Chris  |
|    2 | Sheeri |
|    3 | Elie   |
+------+--------+
3 rows in set (0.14 sec)

mysql&gt; exit;</pre>
<p class="paragraph_style_1"> </p>
<p class="paragraph_style">Enjoy FSE tables!</p>
<p class="paragraph_style_1"> </p>
<p class="paragraph_style">Bye! Thanks for all the fish!</p>
<p class="paragraph_style_2" style="padding-bottom: 0pt"><a title="mailto:christos@themysqlguy.com" href="mailto:christos@themysqlguy.com">christos@themysqlguy.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://themysqlguy.com/wp-content/uploads/episodes/episode_05.mp3" length="4691114" type="audio/mpeg" />
			<itunes:subtitle>       Federated Storage Engine (FSE) allows you to connect to a remote server and &quot;mount&quot; a table on your local server, which links to the data on the remote server, for read-only access.   - $ mysql -u root -ppassword -h remote - mysql&gt; CREATE DATABA...</itunes:subtitle>
		<itunes:summary>
 
 
 
Federated Storage Engine (FSE) allows you to connect to a remote server and &quot;mount&quot; a table on your local server, which links to the data on the remote server, for read-only access.
 

$ mysql -u root -ppassword -h remote

mysql&gt; CREATE DATABASE test;

mysql&gt; use test;

mysql&gt; CREATE TABLE drivers (id INT,name VARCHAR(100));

mysql&gt; INSERT INTO drivers (id, name) VALUES (1, ‘Chris’);

mysql&gt; INSERT INTO drivers (id, name) VALUES (2, ‘Sheeri’);

mysql&gt; INSERT INTO drivers (id, name) VALUES (3, ‘Elie’);

mysql&gt; select * from drivers;

+------+--------+
| id   | name   |
+------+--------+
|    1 | Chris  |
|    2 | Sheeri |
|    3 | Elie   |
+------+--------+
3 rows in set (0.08 sec)

mysql&gt; exit;

$ mysql -u root -ppassword -h local

mysql&gt; CREATE DATABASE test;

mysql&gt; use test;

mysql&gt; CREATE TABLE drivers (id INT,name VARCHAR(100)) ENGINE=FEDERATED
CONNECTION=’mysql://root:password@remote:3306/test/drivers’;

mysql&gt; select * from drivers;

+------+--------+
| id   | name   |
+------+--------+
|    1 | Chris  |
|    2 | Sheeri |
|    3 | Elie   |
+------+--------+
3 rows in set (0.14 sec)

mysql&gt; exit;
 
Enjoy FSE tables!
 
Bye! Thanks for all the fish!
christos@themysqlguy.com</itunes:summary>
		<itunes:author>Christos Kalantzis</itunes:author>
		<itunes:explicit>no</itunes:explicit>
		<itunes:duration>9:46</itunes:duration>
	</item>
		<item>
		<title>The &#8220;She-BA&#8221; and OurSQL Podcast</title>
		<link>http://www.themysqlguy.com/?p=12</link>
		<comments>http://www.themysqlguy.com/?p=12#comments</comments>
		<pubDate>Fri, 08 Jun 2007 21:36:30 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[From me to you]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=12</guid>
		<description><![CDATA[I wanted to let you know all about a blog and podcast I have been reading/listening to lately. Its called OurSQL and the author is Sheeri Kritzer.I have been in email contact with Sheeri and she seems like a really great person. Why wouldn’t she be? She’s a MySQL DBA after all! The self proclaimed [...]]]></description>
			<content:encoded><![CDATA[<p style="padding-top: 0pt" class="paragraph_style" align="center"><img src="http://themysqlguy.com/wp-content/uploads/she-ba.jpg" /></p>
<p style="padding-top: 0pt" class="paragraph_style">I wanted to let you know all about a blog and podcast I have been reading/listening to lately.  Its called OurSQL and the author is Sheeri Kritzer.I have been in email contact with Sheeri and she seems like a really great person.  Why wouldn’t she be?  She’s a MySQL DBA after all!  The self proclaimed “She-BA”.</p>
<p class="paragraph_style">&nbsp;</p>
<p>Check out her blog at sheeri.net and her Podcast OurSQL on iTunes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=12</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Episode 4 &#8211; Some Questions, my Answers 1</title>
		<link>http://www.themysqlguy.com/?p=13</link>
		<comments>http://www.themysqlguy.com/?p=13#comments</comments>
		<pubDate>Sun, 27 May 2007 21:45:07 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[Episodes]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[questions]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=13</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://themysqlguy.com/wp-content/uploads/episodes/episode_04.mp3" length="2578092" type="audio/mpeg" />
			<itunes:keywords>mysql,questions</itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary></itunes:summary>
		<itunes:author>Christos Kalantzis</itunes:author>
		<itunes:explicit>no</itunes:explicit>
		<itunes:duration>5:20</itunes:duration>
	</item>
		<item>
		<title>Episode 3 &#8211; Slow Query Log</title>
		<link>http://www.themysqlguy.com/?p=11</link>
		<comments>http://www.themysqlguy.com/?p=11#comments</comments>
		<pubDate>Fri, 06 Apr 2007 21:25:56 +0000</pubDate>
		<dc:creator>Christos Kalantzis</dc:creator>
				<category><![CDATA[Episodes]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.themysqlguy.com/?p=11</guid>
		<description><![CDATA[      One of the best features of MySQL is the fact that you can have a log of all queries that take longer than n seconds.   Activating the Log   To activate this log start MySQL with the &#8211;log-slow-queries[=file_name] option, or add the previous option to your my.cnf or my.ini and restart [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: center;"><img src="http://themysqlguy.com/wp-content/uploads/slow.jpg" alt="" /></h3>
<p align="center"> </p>
<p align="left"> </p>
<p class="style"> </p>
<p class="paragraph_style" style="padding-top: 0pt">One of the best features of MySQL is the fact that you can</p>
<p class="paragraph_style">have a log of all queries that take longer than <span class="style_1">n</span> seconds.</p>
<p class="paragraph_style"> </p>
<h2><span class="style_2" style="line-height: 23px">Activating the Log</span></h2>
<h2></h2>
<p class="paragraph_style"> </p>
<p class="paragraph_style">To activate this log start MySQL with the <span class="style_1">&#8211;log-slow-queries[=file_name]</span> option, or add the previous option to your my.cnf or my.ini and restart the server:</p>
<pre><span class="style_3" style="line-height: 15px">[mysqld]
</span></pre>
<pre><span class="style_3" style="line-height: 15px">...
</span></pre>
<pre><span class="style_3" style="line-height: 15px">log-slow-queries[=file_name]
</span></pre>
<p class="paragraph_style_1"><span class="style_3" style="line-height: 15px"><br />
</span></p>
<p class="paragraph_style">You can specify a file name for the slow-query-log or it will be called <span class="style_1">host_name-slow.log</span>. By default the log is in the data directory, unless you specify an absolute path with the file name.<span class="style_4" style="line-height: 15px"><br />
</span></p>
<p class="paragraph_style"><span class="style_4" style="line-height: 15px"><br />
</span>
</p>
<p class="paragraph_style">By default a slow query is one that takes 10 seconds. You can change that by specifying <span class="style_1">long_query_time</span> in either during startup or in the my.cnf or my.ini file.</p>
<pre><span class="style_3" style="line-height: 15px">[mysqld]
</span></pre>
<pre><span class="style_3" style="line-height: 15px">...
</span></pre>
<pre><span class="style_3" style="line-height: 15px">log-slow-queries
</span></pre>
<pre><span class="style_3" style="line-height: 15px">long_query_time=8
</span></pre>
<p class="paragraph_style_1"><span class="style_4" style="line-height: 15px"><br />
</span></p>
<p class="paragraph_style"><span class="style_4" style="line-height: 15px"><br />
</span></p>
<h2><span class="style_2" style="line-height: 23px">Viewing the Log</span></h2>
<h2></h2>
</p>
<p class="paragraph_style"> </p>
<p class="paragraph_style">The log is in text format and can easily be viewed by any text editor and looks like this:</p>
<p class="paragraph_style"> </p>
<pre><span class="style_5" style="line-height: 15px"># Time: 070116  5:16:35
</span></pre>
<pre><span class="style_5" style="line-height: 15px"># User@Host: nvusr[nvusr] @ app01 [10.30.5.226]
</span></pre>
<pre><span class="style_5" style="line-height: 15px"># Query_time: 21  Lock_time: 0  Rows_sent: 20  Rows_examined: 4078677
</span></pre>
<pre><span class="style_5" style="line-height: 15px">SELECT ectransactions.*, interchanges.interchange_datetime as transaction_datetime, interchanges.partner_name, interchanges.direction, functional_groups.functional_group_control_numb, fo_name, functional_organization_qualid, partner_name, partner_qualid, interchanges.interchange_control_number, operators.name as operator_name, trading_participants.name as client_name FROM ectransactions  left join functional_groups ON ectransactions.functional_group_id=functional_groups.id left join interchanges ON ectransactions.interchange_id=interchanges.id left join trading_participants ON ectransactions.trading_participant_id=trading_participants.id left join operators ON ectransactions.operator_id=operators.id  ORDER BY client_name asc, transaction_datetime desc  LIMIT 0, 20;</span></pre>
<p class="paragraph_style"> </p>
<p class="paragraph_style">However, its a lot more readable with the <span class="style_6">mysqldumpslow</span> command, whose output looks like this:</p>
<p class="paragraph_style"> </p>
<pre><span class="style_5" style="line-height: 15px">Count: 1  Time=24.00s (24s)  Lock=0.00s (0s)  Rows=20.0 (20), nvusr[nvusr]@tqapp02
</span></pre>
<pre><span class="style_5" style="line-height: 15px">  SELECT ectransactions.*, interchanges.interchange_datetime as transaction_datetime, interchanges.partner_name, interchanges.direction, functional_groups.functional_group_control_numb, fo_name, functional_organization_qualid, partner_name, partner_qualid, interchanges.interchange_control_number, operators.name as operator_name, trading_participants.name as client_name FROM ectransactions  left join functional_groups ON ectransactions.functional_group_id=functional_groups.id left join interchanges ON ectransactions.interchange_id=interchanges.id left join trading_participants ON ectransactions.trading_participant_id=trading_participants.id left join operators ON ectransactions.operator_id=operators.id  ORDER BY transaction_datetime asc, description desc  LIMIT N, N
</span></pre>
<pre><span class="style_5" style="line-height: 15px">
</span></pre>
<pre><span class="style_5" style="line-height: 15px">Count: 2  Time=22.00s (44s)  Lock=0.00s (0s)  Rows=20.0 (40), nvusr[nvusr]@2hosts
</span></pre>
<pre><span class="style_5" style="line-height: 15px">  SELECT ectransactions.*, interchanges.interchange_datetime as transaction_datetime, interchanges.partner_name, interchanges.direction, functional_groups.functional_group_control_numb, fo_name, functional_organization_qualid, partner_name, partner_qualid, interchanges.interchange_control_number, operators.name as operator_name, trading_participants.name as client_name FROM ectransactions  left join functional_groups ON ectransactions.functional_group_id=functional_groups.id left join interchanges ON ectransactions.interchange_id=interchanges.id left join trading_participants ON ectransactions.trading_participant_id=trading_participants.id left join operators ON ectransactions.operator_id=operators.id  ORDER BY client_name asc, transaction_datetime desc  LIMIT N, N</span></pre>
<p class="paragraph_style"> </p>
<p class="paragraph_style"> </p>
<h2>I Want More!</h2>
<p class="paragraph_style">You can also have MySQL add all queries that don’t use indexes into the slow-query-log. Add <strong><span class="style_1">&#8211;log-queries-not-using-indexes</span></strong> during startup or in the <em>my.cnf</em> or <em>my.ini</em> file.</p>
<p class="paragraph_style"> </p>
<p class="paragraph_style">
Bye! Thanks for all the fish!
</p>
<p class="paragraph_style_3" style="padding-bottom: 0pt"><a title="mailto:christos@themysqlguy.com" href="mailto:christos@themysqlguy.com">christos@themysqlguy.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themysqlguy.com/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://themysqlguy.com/wp-content/uploads/episodes/episode_03.mp3" length="3404966" type="audio/mpeg" />
			<itunes:keywords>log,mysql,troubleshooting</itunes:keywords>
		<itunes:subtitle>       One of the best features of MySQL is the fact that you can have a log of all queries that take longer than n seconds.   - Activating the Log -   To activate this log start MySQL with the --log-slow-queries[=file_name] option,</itunes:subtitle>
		<itunes:summary>
 
 
 
One of the best features of MySQL is the fact that you can
have a log of all queries that take longer than n seconds.
 

Activating the Log

 
To activate this log start MySQL with the --log-slow-queries[=file_name] option, or add the previous option to your my.cnf or my.ini and restart the server:

[mysqld]

...

log-slow-queries[=file_name]




You can specify a file name for the slow-query-log or it will be called host_name-slow.log. By default the log is in the data directory, unless you specify an absolute path with the file name.




By default a slow query is one that takes 10 seconds. You can change that by specifying long_query_time in either during startup or in the my.cnf or my.ini file.

[mysqld]

...

log-slow-queries

long_query_time=8






Viewing the Log

 
The log is in text format and can easily be viewed by any text editor and looks like this:
 

# Time: 070116  5:16:35

# User@Host: nvusr[nvusr] @ app01 [10.30.5.226]

# Query_time: 21  Lock_time: 0  Rows_sent: 20  Rows_examined: 4078677

SELECT ectransactions.*, interchanges.interchange_datetime as transaction_datetime, interchanges.partner_name, interchanges.direction, functional_groups.functional_group_control_numb, fo_name, functional_organization_qualid, partner_name, partner_qualid, interchanges.interchange_control_number, operators.name as operator_name, trading_participants.name as client_name FROM ectransactions  left join functional_groups ON ectransactions.functional_group_id=functional_groups.id left join interchanges ON ectransactions.interchange_id=interchanges.id left join trading_participants ON ectransactions.trading_participant_id=trading_participants.id left join operators ON ectransactions.operator_id=operators.id  ORDER BY client_name asc, transaction_datetime desc  LIMIT 0, 20;
 
However, its a lot more readable with the mysqldumpslow command, whose output looks like this:
 

Count: 1  Time=24.00s (24s)  Lock=0.00s (0s)  Rows=20.0 (20), nvusr[nvusr]@tqapp02

  SELECT ectransactions.*, interchanges.interchange_datetime as transaction_datetime, interchanges.partner_name, interchanges.direction, functional_groups.functional_group_control_numb, fo_name, functional_organization_qualid, partner_name, partner_qualid, interchanges.interchange_control_number, operators.name as operator_name, trading_participants.name as client_name FROM ectransactions  left join functional_groups ON ectransactions.functional_group_id=functional_groups.id left join interchanges ON ectransactions.interchange_id=interchanges.id left join trading_participants ON ectransactions.trading_participant_id=trading_participants.id left join operators ON ectransactions.operator_id=operators.id  ORDER BY transaction_datetime asc, description desc  LIMIT N, N



Count: 2  Time=22.00s (44s)  Lock=0.00s (0s)  Rows=20.0 (40), nvusr[nvusr]@2hosts

  SELECT ectransactions.*, interchanges.interchange_datetime as transaction_datetime, interchanges.partner_name, interchanges.direction, functional_groups.functional_group_control_numb, fo_name, functional_organization_qualid, partner_name, partner_qualid, interchanges.interchange_control_number, operators.name as operator_name, trading_participants.name as client_name FROM ectransactions  left join functional_groups ON ectransactions.functional_group_id=functional_groups.id left join interchanges ON ectransactions.interchange_id=interchanges.id left join trading_participants ON ectransactions.trading_participant_id=trading_participants.id left join operators ON ectransactions.operator_id=operators.id  ORDER BY client_name asc, transaction_datetime desc  LIMIT N, N
 
 

I Want More!
You can also have MySQL add all queries that don’t use indexes into the slow-query-log. Add --log-queries-not-using-indexes during startup or in the my.cnf or my.ini file.
 


Bye! Thanks for all the fish!
christos@themysqlguy.com</itunes:summary>
		<itunes:author>Christos Kalantzis</itunes:author>
		<itunes:explicit>no</itunes:explicit>
		<itunes:duration>7:05</itunes:duration>
	</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.767 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-04 07:11:44 -->
