<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">

<channel>
	<title>Jet Profiler for MySQL</title>
	<link>http://www.jetprofiler.com</link>
	<description>On Jet Profiler, MySQL profiling and query optimizing.</description>
	<image>
		<width>120</width>
		<height>25</height>
		<link>http://www.jetprofiler.com</link>
		<title>Jet Profiler for MySQL</title>
		<url>http://www.jetprofiler.com/img/jp_logo_feed.png</url>
	</image>
	<language>en-us</language>
	<copyright>2009 Polaricon AB. All rights reserved.</copyright>
	
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/jetprofilerformysql" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>myterm - extensible mysql command line client</title>
		<link>http://www.jetprofiler.com/blog/8/myterm---extensible-mysql-command-line-client/</link>
		<guid isPermaLink="true">http://www.jetprofiler.com/blog/8/myterm---extensible-mysql-command-line-client/</guid>
		<category>myterm</category>
		<category>mysql</category>
		<pubDate>Thu, 05 Nov 2009 11:47:22 -0500</pubDate>
		<description>What if I type this:


myterm&amp;gt; SELECT engine, count(*) AS count FROM information_schema.tables GROUP BY 1 ORDER BY 2 DESC | chart pie | browser

and Firefox says:What&amp;#039;s that?I just launched an open-source project on launchpad called myterm. Myterm is a crossover between the standard mysql command line client and the concept of pipes and filters in bash. You can use it to run queries and filter the produced result set in various ways using pipe chaining. This lends itself to quite a lot of different use cases, for instance graphical charts, md5 checksums and different presentation forms to name a few. It has browser integration using shell exec, which means it can render html result sets or charts in your browser. And since most stuff is written using plugins, it will work well to serve as a hub for hooking in more and more tools for data transfer, dumping, backup, simplify monitoring and so on. Sort of like inversed bash-scripting; you start inside the db going out.

The model is based on commands, filters, presenters and dests. The COMMAND (usually a query) produces a result set which is sent of to a chain of filters. Each FILTER can process the result set and reformat the data. A PRESENTER takes a result set and renders it in some form, e.g. plain text, tab separated values, html table or chart. Finally, a DEST is simply the destination of the rendered output, such as standard out, a file or the browser. A full command chain:

COMMAND --resultset--&amp;gt; FILTER --resultset--&amp;gt; PRESENTER --mime--&amp;gt; DESTSome examplesFirst some standard output:

myterm&amp;gt; SHOW PROCESSLIST+------+------+-----------------+------+---------+------+-------+------------------+| Id   | User | Host            | db   | Command | Time | State | Info             |+------+------+-----------------+------+---------+------+-------+------------------+| 4789 | root | 127.0.0.1:59047 | test | Query   |    0 |       | SHOW PROCESSLIST |+------+------+-----------------+------+---------+------+-------+------------------+1 row in set (0.000 sec)

Then, lets use the cols filter:


myterm&amp;gt; SHOW PROCESSLIST | cols 2-3+------+-----------------+| User | Host            |+------+-----------------+| root | 127.0.0.1:59047 |+------+-----------------+1 row in set (0.000 sec)

which filters out some columns. Similarly, a basic grep filter exists. Lets hope people won&amp;#039;t stop using indexes just because of this:


myterm&amp;gt; SHOW DATABASES | grep info+--------------------+| Database           |+--------------------+| information_schema |+--------------------+1 row in set (0.001 sec)

For chart rendering, myterm uses libchart by Jean-Marc Tremeaux. Take a look at the biggest tables:


myterm&amp;gt; SELECT CONCAT(table_schema, &amp;#039;.&amp;#039;, table_name) AS &amp;#039;Table&amp;#039;, data_length + index_length AS Bytes FROM information_schema.tables ORDER BY 2 DESC | other 7 | chart hbar

The other filter just reduces any rows after 6 into a total item named Other. Resulting bar chart:

The insertify plugin will reverse engineer a result set into a create statement and an insert statement. This is not as rock-solid or performant as CREATE...SELECT (it won&amp;#039;t pick up indexes), but works for creating temporary snapshots or test data:


myterm&amp;gt; SHOW PROCESSLIST|insertify|tsv -N -ECREATE TABLE &amp;#039;some_table&amp;#039; (    &amp;#039;Id&amp;#039; bigint(11) NOT NULL DEFAULT &amp;#039;&amp;#039;,    &amp;#039;User&amp;#039; varchar(16) NOT NULL DEFAULT &amp;#039;&amp;#039;,    &amp;#039;Host&amp;#039; varchar(64) NOT NULL DEFAULT &amp;#039;&amp;#039;,    &amp;#039;db&amp;#039; varchar(64) DEFAULT NULL,    &amp;#039;Command&amp;#039; varchar(16) NOT NULL DEFAULT &amp;#039;&amp;#039;,    &amp;#039;Time&amp;#039; int(7) UNSIGNED NOT NULL DEFAULT &amp;#039;&amp;#039;,    &amp;#039;State&amp;#039; varchar(30) DEFAULT NULL,    &amp;#039;Info&amp;#039; varchar(100) DEFAULT NULL) ENGINE=InnoDB;INSERT INTO some_table (Id, User, Host, db, Command, Time, State, Info) VALUES (&amp;#039;4789&amp;#039;, &amp;#039;root&amp;#039;, &amp;#039;127.0.0.1:59047&amp;#039;, &amp;#039;test&amp;#039;, &amp;#039;Query&amp;#039;, &amp;#039;0&amp;#039;, NULL, &amp;#039;SHOW PROCESSLIST&amp;#039;);2 rows in set (0.000 sec)

Here are the plugins so far:


myterm&amp;gt; plugins list15 plugins loaded:Filters:  cols        Filters columns and column ranges.  grep        Filters lines containing the specified text in any column.  insertify   Creates insert statements based on a result set.  other       Reduces a result to max N rows, collapsing any extra rows to a row titled Other at the end.Presenters:  chart       Renders a chart using php Libchart.  html        Formats the data to a html table.  md5         Calculates an md5 checksum of all rows and column values.  plain       Formats the data to the default plain text table grid.  tsv         Formats the data to tab-separated-values plain text.  vert        Presents the data in a vertical plain-text fashion, similar to mysql \G output format.  vhtml       Formats the data to a record by record, vertical html table.Dests:  browser     Sends the output to the browser.  file        Sends output to a file with the given filename.  mailto      Sends output to the registered email application using a mailto: link  std         Sends output to standard out.
Current statusIt&amp;#039;s currently written in PHP, which is kind of bad, because of PHP:s limited console integration, signal handling (ctrl-c) and threading (think +asynchronous / multi-threaded queries). Maybe a rewrite in Python would fix these issues. Eric Day has initiated a similar project at Portland State University which is about to start... ...and they&amp;#039;re thinking of Python! So I&amp;#039;ve contacted him about possibly combining these projects in some way later on, once both projects have gotten further. DownloadTo download it, you need bazaar and php 5.2+ command line with mysqli extension. I&amp;#039;ve only tested it on Ubuntu Linux. Type:


bzr branch lp:myterm

then follow the README file.ContributeFor now, myterm parsing and option handling is limited (don&amp;#039;t do multi-line queries, comments or too much quoting), but most basic stuff works. There are probably tons of bugs in it and things that don&amp;#039;t work, I know :) So... if you&amp;#039;d like to contribute, join the project and mailing list on launchpad. There, you can also look at the blueprints which are some ideas on additional features. 

Feel free to leave comments and feature suggestions!</description>
		<content:encoded>What if I type this:&lt;br /&gt;
&lt;br /&gt;
&lt;ol class="code"&gt;
&lt;li&gt;myterm&amp;gt; SELECT engine, count(*) AS count FROM information_schema.tables GROUP BY 1 ORDER BY 2 DESC | chart pie | browser&lt;/li&gt;&lt;/ol&gt;
&lt;br /&gt;
and Firefox says:&lt;img style="display: block; margin: 15px 0 15px 0; border: 0;" src="http://www.jetprofiler.com/img/blog/myterm_pie.png" alt="Myterm pie"/&gt;&lt;h2&gt;What&amp;#039;s that?&lt;/h2&gt;I just launched an open-source project on launchpad called &lt;a rel="nofollow" target="_new" href="https://launchpad.net/myterm"&gt;myterm&lt;/a&gt;. Myterm is a crossover between the standard mysql command line client and the concept of pipes and filters in bash. You can use it to run queries and filter the produced result set in various ways using pipe chaining. This lends itself to quite a lot of different use cases, for instance graphical charts, md5 checksums and different presentation forms to name a few. It has browser integration using shell exec, which means it can render html result sets or charts in your browser. And since most stuff is written using plugins, it will work well to serve as a hub for hooking in more and more tools for data transfer, dumping, backup, simplify monitoring and so on. Sort of like inversed bash-scripting; you start inside the db going out.&lt;br /&gt;
&lt;br /&gt;
The model is based on commands, filters, presenters and dests. The COMMAND (usually a query) produces a result set which is sent of to a chain of filters. Each FILTER can process the result set and reformat the data. A PRESENTER takes a result set and renders it in some form, e.g. plain text, tab separated values, html table or chart. Finally, a DEST is simply the destination of the rendered output, such as standard out, a file or the browser. A full command chain:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;COMMAND --resultset--&amp;gt; FILTER --resultset--&amp;gt; PRESENTER --mime--&amp;gt; DEST&lt;/b&gt;&lt;h2&gt;Some examples&lt;/h2&gt;First some standard output:&lt;br /&gt;
&lt;ol class="code"&gt;
&lt;li&gt;myterm&amp;gt; SHOW PROCESSLIST&lt;/li&gt;&lt;li&gt;+------+------+-----------------+------+---------+------+-------+------------------+&lt;/li&gt;&lt;li&gt;| Id   | User | Host            | db   | Command | Time | State | Info             |&lt;/li&gt;&lt;li&gt;+------+------+-----------------+------+---------+------+-------+------------------+&lt;/li&gt;&lt;li&gt;| 4789 | root | 127.0.0.1:59047 | test | Query   |    0 |       | SHOW PROCESSLIST |&lt;/li&gt;&lt;li&gt;+------+------+-----------------+------+---------+------+-------+------------------+&lt;/li&gt;&lt;li&gt;1 row in set (0.000 sec)&lt;/li&gt;&lt;/ol&gt;
&lt;br /&gt;
Then, lets use the &lt;b&gt;cols&lt;/b&gt; filter:&lt;br /&gt;
&lt;br /&gt;
&lt;ol class="code"&gt;
&lt;li&gt;myterm&amp;gt; SHOW PROCESSLIST | cols 2-3&lt;/li&gt;&lt;li&gt;+------+-----------------+&lt;/li&gt;&lt;li&gt;| User | Host            |&lt;/li&gt;&lt;li&gt;+------+-----------------+&lt;/li&gt;&lt;li&gt;| root | 127.0.0.1:59047 |&lt;/li&gt;&lt;li&gt;+------+-----------------+&lt;/li&gt;&lt;li&gt;1 row in set (0.000 sec)&lt;/li&gt;&lt;/ol&gt;
&lt;br /&gt;
which filters out some columns. Similarly, a basic &lt;b&gt;grep&lt;/b&gt; filter exists. Lets hope people won&amp;#039;t stop using indexes just because of this:&lt;br /&gt;
&lt;br /&gt;
&lt;ol class="code"&gt;
&lt;li&gt;myterm&amp;gt; SHOW DATABASES | grep info&lt;/li&gt;&lt;li&gt;+--------------------+&lt;/li&gt;&lt;li&gt;| Database           |&lt;/li&gt;&lt;li&gt;+--------------------+&lt;/li&gt;&lt;li&gt;| information_schema |&lt;/li&gt;&lt;li&gt;+--------------------+&lt;/li&gt;&lt;li&gt;1 row in set (0.001 sec)&lt;/li&gt;&lt;/ol&gt;
&lt;br /&gt;
For chart rendering, myterm uses &lt;a rel="nofollow" target="_new" href="http://naku.dohcrew.com/libchart/pages/introduction/"&gt;libchart&lt;/a&gt; by Jean-Marc Tremeaux. Take a look at the biggest tables:&lt;br /&gt;
&lt;br /&gt;
&lt;ol class="code"&gt;
&lt;li&gt;myterm&amp;gt; SELECT CONCAT(table_schema, &amp;#039;.&amp;#039;, table_name) AS &amp;#039;Table&amp;#039;, data_length + index_length AS Bytes FROM information_schema.tables ORDER BY 2 DESC | other 7 | chart hbar&lt;/li&gt;&lt;/ol&gt;
&lt;br /&gt;
The &lt;b&gt;other&lt;/b&gt; filter just reduces any rows after 6 into a total item named Other. Resulting bar chart:&lt;img style="display: block; margin: 15px 0 15px 0; border: 0;" src="http://www.jetprofiler.com/img/blog/myterm_hbar.png" alt="Myterm hbar"/&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;insertify&lt;/b&gt; plugin will reverse engineer a result set into a create statement and an insert statement. This is not as rock-solid or performant as CREATE...SELECT (it won&amp;#039;t pick up indexes), but works for creating temporary snapshots or test data:&lt;br /&gt;
&lt;br /&gt;
&lt;ol class="code"&gt;
&lt;li&gt;myterm&amp;gt; SHOW PROCESSLIST|insertify|tsv -N -E&lt;/li&gt;&lt;li&gt;CREATE TABLE &amp;#039;some_table&amp;#039; (&lt;/li&gt;&lt;li&gt;    &amp;#039;Id&amp;#039; bigint(11) NOT NULL DEFAULT &amp;#039;&amp;#039;,&lt;/li&gt;&lt;li&gt;    &amp;#039;User&amp;#039; varchar(16) NOT NULL DEFAULT &amp;#039;&amp;#039;,&lt;/li&gt;&lt;li&gt;    &amp;#039;Host&amp;#039; varchar(64) NOT NULL DEFAULT &amp;#039;&amp;#039;,&lt;/li&gt;&lt;li&gt;    &amp;#039;db&amp;#039; varchar(64) DEFAULT NULL,&lt;/li&gt;&lt;li&gt;    &amp;#039;Command&amp;#039; varchar(16) NOT NULL DEFAULT &amp;#039;&amp;#039;,&lt;/li&gt;&lt;li&gt;    &amp;#039;Time&amp;#039; int(7) UNSIGNED NOT NULL DEFAULT &amp;#039;&amp;#039;,&lt;/li&gt;&lt;li&gt;    &amp;#039;State&amp;#039; varchar(30) DEFAULT NULL,&lt;/li&gt;&lt;li&gt;    &amp;#039;Info&amp;#039; varchar(100) DEFAULT NULL&lt;/li&gt;&lt;li&gt;) ENGINE=InnoDB;&lt;/li&gt;&lt;li&gt;INSERT INTO some_table (Id, User, Host, db, Command, Time, State, Info) VALUES (&amp;#039;4789&amp;#039;, &amp;#039;root&amp;#039;, &amp;#039;127.0.0.1:59047&amp;#039;, &amp;#039;test&amp;#039;, &amp;#039;Query&amp;#039;, &amp;#039;0&amp;#039;, NULL, &amp;#039;SHOW PROCESSLIST&amp;#039;);&lt;/li&gt;&lt;li&gt;2 rows in set (0.000 sec)&lt;/li&gt;&lt;/ol&gt;
&lt;br /&gt;
Here are the plugins so far:&lt;br /&gt;
&lt;br /&gt;
&lt;ol class="code"&gt;
&lt;li&gt;myterm&amp;gt; plugins list&lt;/li&gt;&lt;li&gt;15 plugins loaded:&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;Filters:&lt;/li&gt;&lt;li&gt;  cols        Filters columns and column ranges.&lt;/li&gt;&lt;li&gt;  grep        Filters lines containing the specified text in any column.&lt;/li&gt;&lt;li&gt;  insertify   Creates insert statements based on a result set.&lt;/li&gt;&lt;li&gt;  other       Reduces a result to max N rows, collapsing any extra rows to a row titled Other at the end.&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;Presenters:&lt;/li&gt;&lt;li&gt;  chart       Renders a chart using php Libchart.&lt;/li&gt;&lt;li&gt;  html        Formats the data to a html table.&lt;/li&gt;&lt;li&gt;  md5         Calculates an md5 checksum of all rows and column values.&lt;/li&gt;&lt;li&gt;  plain       Formats the data to the default plain text table grid.&lt;/li&gt;&lt;li&gt;  tsv         Formats the data to tab-separated-values plain text.&lt;/li&gt;&lt;li&gt;  vert        Presents the data in a vertical plain-text fashion, similar to mysql \G output format.&lt;/li&gt;&lt;li&gt;  vhtml       Formats the data to a record by record, vertical html table.&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;Dests:&lt;/li&gt;&lt;li&gt;  browser     Sends the output to the browser.&lt;/li&gt;&lt;li&gt;  file        Sends output to a file with the given filename.&lt;/li&gt;&lt;li&gt;  mailto      Sends output to the registered email application using a mailto: link&lt;/li&gt;&lt;li&gt;  std         Sends output to standard out.&lt;/li&gt;&lt;/ol&gt;
&lt;h2&gt;Current status&lt;/h2&gt;It&amp;#039;s currently written in PHP, which is kind of bad, because of PHP:s limited console integration, signal handling (ctrl-c) and threading (think +asynchronous / multi-threaded queries). Maybe a rewrite in Python would fix these issues. Eric Day has initiated a &lt;a rel="nofollow" target="_new" href="http://oddments.org/?p=206"&gt;similar project&lt;/a&gt; at Portland State University which is about to start... ...and they&amp;#039;re thinking of Python! So I&amp;#039;ve contacted him about possibly combining these projects in some way later on, once both projects have gotten further. &lt;h2&gt;Download&lt;/h2&gt;To download it, you need bazaar and php 5.2+ command line with mysqli extension. I&amp;#039;ve only tested it on Ubuntu Linux. Type:&lt;br /&gt;
&lt;br /&gt;
&lt;ol class="code"&gt;
&lt;li&gt;bzr branch lp:myterm&lt;/li&gt;&lt;/ol&gt;
&lt;br /&gt;
then follow the README file.&lt;h2&gt;Contribute&lt;/h2&gt;For now, myterm parsing and option handling is limited (don&amp;#039;t do multi-line queries, comments or too much quoting), but most basic stuff works. There are probably tons of bugs in it and things that don&amp;#039;t work, I know :) So... if you&amp;#039;d like to contribute, &lt;a rel="nofollow" target="_new" href="https://launchpad.net/~myterm-team"&gt;join the project&lt;/a&gt; and mailing list on launchpad. There, you can also look at the &lt;a rel="nofollow" target="_new" href="https://blueprints.launchpad.net/myterm"&gt;blueprints&lt;/a&gt; which are some ideas on additional features. &lt;br /&gt;
&lt;br /&gt;
Feel free to leave comments and feature suggestions!&lt;br /&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.jetprofiler.com/blog/8/myterm---extensible-mysql-command-line-client/#comments"&gt;4 Comments&lt;/a&gt;		</content:encoded>
		<dc:creator>Bjorn Melinder</dc:creator>
	</item>
	<item>
		<title>New license model</title>
		<link>http://www.jetprofiler.com/blog/7/new-license-model/</link>
		<guid isPermaLink="true">http://www.jetprofiler.com/blog/7/new-license-model/</guid>
		<category>news</category>
		<pubDate>Mon, 31 Aug 2009 09:15:10 -0400</pubDate>
		<description>We&amp;#039;ve received a lot of feedback from our customers regarding our licensing model. Many people felt annual subscriptions were limiting since they would have to renew the license every year. Another limitation was that the software would only run on one single computer. 

We&amp;#039;re now pleased to announce that the license model has changed:No more subscriptionsWe&amp;#039;ve removed the one year limitation of the subscription-based model. The new license allows you to use the software for as long as you like. There will be no more recurring fees, and the software will not stop working after one year of use.More installationsAnother improvement is that we now support two installations per license. This allows for much greater flexibility. You can install it on your laptop and desktop at the same time (or at work and at home). Or you can share the license with a colleague or give it to a friend.

Note to existing subscribers:
All customers with subscription-based licenses will be offered to convert to a normal license with the next renewal. So instead of paying $399 for a completely new license, you can pay $99 the next time you renew your subscription. You will then receive a normal license. An added benefit is that if you have multiple licenses, you can cut the number of licenses in half since each license is valid for two computers. A sales representative will contact you in time with more information.</description>
		<content:encoded>We&amp;#039;ve received a lot of feedback from our customers regarding our licensing model. Many people felt annual subscriptions were limiting since they would have to renew the license every year. Another limitation was that the software would only run on one single computer. &lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re now pleased to announce that the license model has changed:&lt;h3&gt;No more subscriptions&lt;/h3&gt;We&amp;#039;ve removed the one year limitation of the subscription-based model. The new license allows you to use the software for as long as you like. There will be no more recurring fees, and the software will not stop working after one year of use.&lt;h3&gt;More installations&lt;/h3&gt;Another improvement is that we now support two installations per license. This allows for much greater flexibility. You can install it on your laptop and desktop at the same time (or at work and at home). Or you can share the license with a colleague or give it to a friend.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note to existing subscribers:&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;All customers with subscription-based licenses will be offered to convert to a normal license with the next renewal. So instead of paying $399 for a completely new license, you can pay $99 the next time you renew your subscription. You will then receive a normal license. An added benefit is that if you have multiple licenses, you can cut the number of licenses in half since each license is valid for two computers. A sales representative will contact you in time with more information.&lt;/i&gt;&lt;br /&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.jetprofiler.com/blog/7/new-license-model/#comments"&gt;Comments&lt;/a&gt;		</content:encoded>
		<dc:creator>Bjorn, Jet Profiler team</dc:creator>
	</item>
	<item>
		<title>Jet Profiler for MySQL 1.0 released</title>
		<link>http://www.jetprofiler.com/blog/6/jet-profiler-for-mysql-10-released/</link>
		<guid isPermaLink="true">http://www.jetprofiler.com/blog/6/jet-profiler-for-mysql-10-released/</guid>
		<category>mysql</category>
		<category>news</category>
		<pubDate>Tue, 10 Feb 2009 08:31:19 -0500</pubDate>
		<description>This is the first public release. Features:


Top Queries - See which queries are being run the most on your server.Top Users - See which users are using your server the most.Top Tables - See which database tables are opened the most.Top States - See which states your database is most busy doing, such as creating temp tables.Replication Profiling - You can measure how much capacity you have left on the replication SQL thread on slaves. If you are using MyISAM a lot, a MyISAM lock analysis will help discover any locks associated with replication, as well as lock-prone queries in general.Query Ratings and Visualization - You can get your queries rated using EXPLAIN and see which queries are most likely to cause load due to missing indices etc. The execution plan can be visualized in a diagram, which shows the table lookups involved, the join size and any bad indicators.Zoomable GUI - You can easily zoom in on spikes in your load and see the corresponding queries for that time interval.Low Overhead - Running the tool against MySQL typically costs around 1%. Recording granularity customizable 100ms - 10s.Works on Windows, Linux and Mac

Download the free version, try it and let us know what you think is good and what isn&amp;#039;t. It doesn&amp;#039;t cost anything and isn&amp;#039;t time limited. Read more...</description>
		<content:encoded>&lt;a href="http://www.jetprofiler.com/screenshots/"&gt;&lt;img style="display: block; margin: 15px 0 15px 0; border: 0;" src="http://www.jetprofiler.com/img/screenshots/top_queries_500.png" alt="Top queries 500"/&gt;&lt;/a&gt;&lt;br /&gt;
This is the first public release. Features:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Top Queries&lt;/b&gt; - See which queries are being run the most on your server.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Top Users&lt;/b&gt; - See which users are using your server the most.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Top Tables&lt;/b&gt; - See which database tables are opened the most.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Top States&lt;/b&gt; - See which states your database is most busy doing, such as creating temp tables.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Replication Profiling&lt;/b&gt; - You can measure how much capacity you have left on the replication SQL thread on slaves. If you are using MyISAM a lot, a MyISAM lock analysis will help discover any locks associated with replication, as well as lock-prone queries in general.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Query Ratings and Visualization&lt;/b&gt; - You can get your queries rated using EXPLAIN and see which queries are most likely to cause load due to missing indices etc. The execution plan can be visualized in a diagram, which shows the table lookups involved, the join size and any bad indicators.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Zoomable GUI&lt;/b&gt; - You can easily zoom in on spikes in your load and see the corresponding queries for that time interval.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Low Overhead&lt;/b&gt; - Running the tool against MySQL typically costs around 1%. Recording granularity customizable 100ms - 10s.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Works on Windows, Linux and Mac&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;
&lt;a href="http://www.jetprofiler.com/download/"&gt;Download&lt;/a&gt; the free version, try it and let us know what you think is good and what isn&amp;#039;t. It doesn&amp;#039;t cost anything and isn&amp;#039;t time limited. &lt;a href="http://www.jetprofiler.com/"&gt;Read more...&lt;/a&gt;&lt;br /&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.jetprofiler.com/blog/6/jet-profiler-for-mysql-10-released/#comments"&gt;Comments&lt;/a&gt;		</content:encoded>
		<dc:creator>Bjorn, Jet Profiler team</dc:creator>
	</item>
	<item>
		<title>Query profiling using SHOW PROCESSLIST</title>
		<link>http://www.jetprofiler.com/blog/5/query-profiling-using-show-processlist/</link>
		<guid isPermaLink="true">http://www.jetprofiler.com/blog/5/query-profiling-using-show-processlist/</guid>
		<category>mysql</category>
		<category>news</category>
		<category>query profiling</category>
		<category>processlist</category>
		<pubDate>Thu, 20 Nov 2008 12:22:41 -0500</pubDate>
		<description>The MySQL database server can display a lot of performance statistics. However, most of them relate to general server parameters, such as buffer sizes and query cache settings. Of course, such settings are important to get right, and can make a huge difference in performance. Once you&amp;#039;ve tuned them however, you need to start looking at the tables and queries. When a single bad query can cost 90 - 99% of the total performance, server tuning doesn&amp;#039;t fix the problem. But obtaining query profiling information from MySQL can be tricky. Here are some of the options:Slow query logYou can use the built-in slow_query_log from within the server. It will show you queries that take more than a second. Such queries typically don&amp;#039;t use indices properly and are important to address. But only slow queries end up there, and many performance problems aren&amp;#039;t caused by slow queries, but by queries that are run very often (for example, for-loops in the code instead of JOINs). You could use complete server query logging. This will log every statement to file, but it&amp;#039;s not recommended, as it will take too much disk I/O.SHOW PROFILESSHOW PROFILES command by Jeremy Cole (available from MySQL 5.0.37) can help you a great deal. Once enabled, it will gather cpu execution times and other important information on up to 100 queries. You can compare the results and see wich query is most expensive. This article explains more. SHOW USER / INDEX / TABLE STATISTICSThe SHOW USER / INDEX / TABLE STATISTICS patches from Google add functionality to trace cpu time and much more per user, index and table. No query information is shown though, you will have to figure that out based on the tables. The patches are not part of the main MySQL distribution, but Percona provides prebuilt MySQL versions.MySQL Enterprise Monitor&amp;#039;s Query AnalyzerMySQL Enterprise Monitor&amp;#039;s Query Analyzer is great for finding the heaviest queries. Using MySQL Proxy (man-in-the-middle software), it collects all queries sent to the server and ranks them by execution time. You can also see number of times the query was run, and number of rows typically returned. Being the best tool of them all, it also costs, and it requires additional software/hardware setup for the MySQL Proxy.SHOW PROCESSLISTAnother option is the SHOW PROCESSLIST command. It shows a list of currently running processes (queries), slightly similar to the Unix ps command or Windows Task Manager. For every query, you can see how long the query has run, its user, ip and state. If you run this command just once, you will get a snapshot of what queries the server is busy doing right now. Aggregating multiple snapshots over time can give you a good view of what queries the server typically is busy performing. An advantage of SHOW PROCESSLIST is that it works on all MySQL versions without modifications and requires no additional software / hardware. On the downside, you don&amp;#039;t necessarily catch all queries, just the queries that happen to run during every snapshot. If you collect many snapshots over long time, this is less of a problem.IssuesYou might not have the option to go for MySQL Enterprise, or install MySQL Proxy in front of your database servers. Or you might not be able to swith to the MySQL server versions containing Google&amp;#039;s patches or SHOW PROFILES. Another problem is, that even if you do get profiling information, it is typically presented in raw text form, and might not be easy to browse through. Good tools to visualize the profiling information and navigate through the data is just as important as getting the information in the first place.A new profiling tool We&amp;#039;re currently in the process of developing a tool based on the SHOW PROCESSLIST above. The tool, called Jet Profiler for MySQL, collects process list information and stores it in an internal database where it is analyzed, ranked and presented. After normalizing the queries, top lists are created of:

most frequent queriesmost frequent usersmost frequent tablesmost frequent schemas
By looking at the state of the processes, additional information can be extracted, such as lock-prone queries (if you&amp;#039;re using MyISAM tables), or queries which create a lot of temp tables on disk. The tool is a client desktop app so no server changes are required. It works on all MySQL versions (3.23 - 6.0).Better visualization and usabilityTo provide good visualization, the information is presented in a line chart over time. You can zoom in on spikes and other interesting time intervals, and see the top queries / users / etc for that particular time frame. Every top list is accompanied by a pie chart to make it easier to compare the impact of different items. An experimental EXPLAIN visualization feature is underway, helping you understand the queries better.Beta testers are welcomeWe still have lots of adjustments and features before a public release, but we are looking beta testers. If you are interested, click here.

More information</description>
		<content:encoded>The MySQL database server can display a lot of performance statistics. However, most of them relate to general server parameters, such as buffer sizes and query cache settings. Of course, such settings are important to get right, and can make a huge difference in performance. Once you&amp;#039;ve tuned them however, you need to start looking at the tables and queries. When a single bad query can cost &lt;b&gt;90 - 99%&lt;/b&gt; of the total performance, server tuning doesn&amp;#039;t fix the problem. But obtaining query profiling information from MySQL can be tricky. Here are some of the options:&lt;h2&gt;Slow query log&lt;/h2&gt;You can use the built-in slow_query_log from within the server. It will show you queries that take more than a second. Such queries typically don&amp;#039;t use indices properly and are important to address. But only slow queries end up there, and many performance problems aren&amp;#039;t caused by slow queries, but by queries that are run very often (for example, for-loops in the code instead of JOINs). You &lt;i&gt;could&lt;/i&gt; use complete server query logging. This will log every statement to file, but it&amp;#039;s not recommended, as it will take too much disk I/O.&lt;h2&gt;SHOW PROFILES&lt;/h2&gt;&lt;a rel="nofollow" target="_new" href="http://dev.mysql.com/doc/refman/5.0/en/show-profiles.html"&gt;SHOW PROFILES&lt;/a&gt; command by Jeremy Cole (available from MySQL 5.0.37) can help you a great deal. Once enabled, it will gather cpu execution times and other important information on up to 100 queries. You can compare the results and see wich query is most expensive. &lt;a rel="nofollow" target="_new" href="http://dev.mysql.com/tech-resources/articles/using-new-query-profiler.html"&gt;This article&lt;/a&gt; explains more. &lt;h2&gt;SHOW USER / INDEX / TABLE STATISTICS&lt;/h2&gt;The &lt;a rel="nofollow" target="_new" href="http://www.mysqlperformanceblog.com/2008/09/12/googles-user_statistics-v2-port-and-changes/"&gt;SHOW USER / INDEX / TABLE STATISTICS&lt;/a&gt; patches from Google add functionality to trace cpu time and much more per user, index and table. No query information is shown though, you will have to figure that out based on the tables. The patches are not part of the main MySQL distribution, but &lt;a rel="nofollow" target="_new" href="http://www.percona.com/percona-lab.html"&gt;Percona&lt;/a&gt; provides prebuilt MySQL versions.&lt;h2&gt;MySQL Enterprise Monitor&amp;#039;s Query Analyzer&lt;/h2&gt;MySQL Enterprise Monitor&amp;#039;s &lt;a rel="nofollow" target="_new" href="http://www.mysql.com/products/enterprise/query.html"&gt;Query Analyzer&lt;/a&gt; is great for finding the heaviest queries. Using MySQL Proxy (man-in-the-middle software), it collects all queries sent to the server and ranks them by execution time. You can also see number of times the query was run, and number of rows typically returned. Being the best tool of them all, it also costs, and it requires additional software/hardware setup for the MySQL Proxy.&lt;h2&gt;SHOW PROCESSLIST&lt;/h2&gt;Another option is the &lt;a rel="nofollow" target="_new" href="http://dev.mysql.com/doc/refman/5.0/en/show-processlist.html"&gt;SHOW PROCESSLIST&lt;/a&gt; command. It shows a list of currently running processes (queries), slightly similar to the Unix ps command or Windows Task Manager. For every query, you can see how long the query has run, its user, ip and state. If you run this command just once, you will get a snapshot of what queries the server is busy doing right now. Aggregating multiple snapshots over time can give you a good view of what queries the server typically is busy performing. An advantage of SHOW PROCESSLIST is that it works on all MySQL versions without modifications and requires no additional software / hardware. On the downside, you don&amp;#039;t necessarily catch all queries, just the queries that happen to run during every snapshot. If you collect many snapshots over long time, this is less of a problem.&lt;h2&gt;Issues&lt;/h2&gt;You might not have the option to go for MySQL Enterprise, or install MySQL Proxy in front of your database servers. Or you might not be able to swith to the MySQL server versions containing Google&amp;#039;s patches or SHOW PROFILES. Another problem is, that even if you do get profiling information, it is typically presented in raw text form, and might not be easy to browse through. Good tools to visualize the profiling information and navigate through the data is just as important as getting the information in the first place.&lt;h1&gt;A new profiling tool&lt;/h1&gt;&lt;img style="float: right; margin: 5px 0px 5px 10px; border: 0;" src="http://www.jetprofiler.com/img/screenshots/top_tables_shadow.png" alt="Top tables shadow"/&gt; We&amp;#039;re currently in the process of developing a tool based on the SHOW PROCESSLIST above. The tool, called &lt;a href="http://www.jetprofiler.com/"&gt;Jet Profiler for MySQL&lt;/a&gt;, collects process list information and stores it in an internal database where it is analyzed, ranked and presented. After normalizing the queries, top lists are created of:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;most frequent queries&lt;/li&gt;&lt;li&gt;most frequent users&lt;/li&gt;&lt;li&gt;most frequent tables&lt;/li&gt;&lt;li&gt;most frequent schemas&lt;/li&gt;&lt;/ul&gt;
By looking at the state of the processes, additional information can be extracted, such as lock-prone queries (if you&amp;#039;re using MyISAM tables), or queries which create a lot of temp tables on disk. The tool is a client desktop app so no server changes are required. It works on all MySQL versions (3.23 - 6.0).&lt;h2&gt;Better visualization and usability&lt;/h2&gt;To provide good visualization, the information is presented in a &lt;a href="http://www.jetprofiler.com/screenshots/"&gt;line chart&lt;/a&gt; over time. You can zoom in on spikes and other interesting time intervals, and see the top queries / users / etc for that particular time frame. Every top list is accompanied by a pie chart to make it easier to compare the impact of different items. An experimental EXPLAIN visualization feature is underway, helping you understand the queries better.&lt;h2&gt;Beta testers are welcome&lt;/h2&gt;We still have lots of adjustments and features before a public release, but we are looking beta testers. If you are interested, &lt;a href="http://www.jetprofiler.com/blog/3/mysql-savvy-beta-testers-wanted/"&gt;click here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.jetprofiler.com/"&gt;More information&lt;/a&gt;&lt;br /&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.jetprofiler.com/blog/5/query-profiling-using-show-processlist/#comments"&gt;1 Comments&lt;/a&gt;		</content:encoded>
		<dc:creator>Bjorn, Jet Profiler team</dc:creator>
	</item>
	<item>
		<title>Best way to visualize EXPLAIN?</title>
		<link>http://www.jetprofiler.com/blog/4/best-way-to-visualize-explain/</link>
		<guid isPermaLink="true">http://www.jetprofiler.com/blog/4/best-way-to-visualize-explain/</guid>
		<category>mysql</category>
		<category>query optimization</category>
		<category>explain</category>
		<pubDate>Wed, 05 Nov 2008 11:37:34 -0500</pubDate>
		<description>Interpreting the output of the MySQL EXPLAIN command can be tricky. From all the information you get, some of the most important information is:


Full table scansHigh join size productUsing filesortsUsing temporary tables

This can be hard to see in the raw output. Example query:

EXPLAIN SELECT b.item_id, b.bidder_id, u.username, MAX(price) AS price FROM bid b JOIN user u ON (b.bidder_id = u.user_id) WHERE b.item_id = &amp;#039;1&amp;#039; GROUP BY b.bidder_id ORDER BY price DESC

The explain outputs:

id, select_type, table, type, possible_keys, key, key_len, ref, rows, Extra
1, SIMPLE, b, ALL, null, null, 0, null, 22660, Using where; Using temporary; Using filesort
1, SIMPLE, u, eq_ref, PRIMARY, PRIMARY, 4, heavybidder.b.bidder_id, 1, 

We&amp;#039;ve been experimenting how to visualize the output of the EXPLAIN command. Using boxes for tables, calculating the join size product and highlighting important information. What do you think of the result so far?

Screenshot:

Ideas, comments?</description>
		<content:encoded>Interpreting the output of the MySQL EXPLAIN command can be tricky. From all the information you get, some of the most important information is:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Full table scans&lt;/li&gt;&lt;li&gt;High join size product&lt;/li&gt;&lt;li&gt;Using filesorts&lt;/li&gt;&lt;li&gt;Using temporary tables&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;
This can be hard to see in the raw output. Example query:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;EXPLAIN SELECT b.item_id, b.bidder_id, u.username, MAX(price) AS price FROM bid b JOIN user u ON (b.bidder_id = u.user_id) WHERE b.item_id = &amp;#039;1&amp;#039; GROUP BY b.bidder_id ORDER BY price DESC&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
The explain outputs:&lt;br /&gt;
&lt;br /&gt;
id, select_type, table, type, possible_keys, key, key_len, ref, rows, Extra&lt;br /&gt;
1, SIMPLE, b, ALL, null, null, 0, null, 22660, Using where; Using temporary; Using filesort&lt;br /&gt;
1, SIMPLE, u, eq_ref, PRIMARY, PRIMARY, 4, heavybidder.b.bidder_id, 1, &lt;br /&gt;
&lt;br /&gt;
We&amp;#039;ve been experimenting how to visualize the output of the EXPLAIN command. Using boxes for tables, calculating the join size product and highlighting important information. What do you think of the result so far?&lt;br /&gt;
&lt;br /&gt;
Screenshot:&lt;img style="display: block; margin: 15px 0 15px 0; border: 0;" src="http://www.jetprofiler.com/img/blog/explain-visualizer.png" alt="Explain visualizer"/&gt;&lt;br /&gt;
&lt;br /&gt;
Ideas, comments?&lt;br /&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.jetprofiler.com/blog/4/best-way-to-visualize-explain/#comments"&gt;2 Comments&lt;/a&gt;		</content:encoded>
		<dc:creator>Bjorn, Jet Profiler team</dc:creator>
	</item>
</channel>

</rss>
