<?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/"
	>

<channel>
	<title>MySQL Preacher &#187; MySQL</title>
	<atom:link href="http://mysqlpreacher.com/wordpress/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysqlpreacher.com/wordpress</link>
	<description>Because Sharing is Caring</description>
	<lastBuildDate>Mon, 26 Sep 2011 23:34:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Effective MySQL Meetup in NY</title>
		<link>http://mysqlpreacher.com/wordpress/2011/04/effective-mysql-meetup-in-ny/</link>
		<comments>http://mysqlpreacher.com/wordpress/2011/04/effective-mysql-meetup-in-ny/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 18:05:00 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[manhattan]]></category>
		<category><![CDATA[meetup]]></category>
		<category><![CDATA[new york]]></category>
		<category><![CDATA[new york city]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=674</guid>
		<description><![CDATA[A few months ago Ronald Bradford took it upon himself to reinvigorate the MySQL community in NY. It was then that Ronald came up with EffectiveMySQL, a much needed breeze of fresh air in the big apple&#8217;s for us MySQL users. This coming Tuesday, 26th April 2011, there is going to be the second (of [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago Ronald Bradford took it upon himself to reinvigorate the MySQL community in NY. It was then that Ronald came up with EffectiveMySQL, a much needed breeze of fresh air in the big apple&#8217;s for us MySQL users.</p>
<p>This coming Tuesday, 26th April 2011, there is going to be the second (of many more to come) presentation, this time about &#8220;Silent data truncations because of overlooked configuration / design&#8221;. The actual title is: &#8220;MySQL Idiosyncrasies That Bite&#8221; presented by Ronald Bradford himself in midtown Manhattan. More details can be found <a href="http://ny.effectivemysql.com/events/16884850/" target="_blank">here</a>.</p>
<p><iframe width="225" height="570" src="http://meetu.ps/TDFy" frameborder="0"></iframe></p>
<p>See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2011/04/effective-mysql-meetup-in-ny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EffectiveMySQL Meetup in NY</title>
		<link>http://mysqlpreacher.com/wordpress/2011/03/effectivemysql-meetup-in-ny/</link>
		<comments>http://mysqlpreacher.com/wordpress/2011/03/effectivemysql-meetup-in-ny/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 21:49:30 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[effectivemysql]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[indexing]]></category>
		<category><![CDATA[meetup]]></category>
		<category><![CDATA[new york]]></category>
		<category><![CDATA[ny]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=640</guid>
		<description><![CDATA[The first EffectiveMySQL meetup will be held in NY on Tuesday 22nd March 2011 by Ronald Bradford. Details here The title of the talk is &#8220;How better indexes save you money&#8221;. Saving money? Hey sure thing :) I&#8217;m in Ronald. For those of you who do not know Ronald Bradford, he&#8217;s an Oracle Ace Director [...]]]></description>
			<content:encoded><![CDATA[<p>The first <a href="http://effectivemysql.com/" target="_blank">EffectiveMySQL</a> meetup will be held in NY on Tuesday 22nd March 2011 by Ronald Bradford. <a href="http://ny.effectivemysql.com/events/16824911/" target="_blank">Details here</a></p>
<p>The title of the talk is &#8220;How better indexes save you money&#8221;. Saving money? Hey sure thing :) I&#8217;m in Ronald.</p>
<p>For those of you who do not know Ronald Bradford, he&#8217;s an Oracle Ace Director in the MySQL field, a long time community contributor and a MySQL expert.</p>
<p>I hope to see you at 902 Broadway New York, NY on Tuesday 22nd March 6pm.</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2011/03/effectivemysql-meetup-in-ny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing all databases from a MySQL instance</title>
		<link>http://mysqlpreacher.com/wordpress/2011/03/removing-all-databases-from-a-mysql/</link>
		<comments>http://mysqlpreacher.com/wordpress/2011/03/removing-all-databases-from-a-mysql/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 19:04:04 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[concat]]></category>
		<category><![CDATA[drop database]]></category>
		<category><![CDATA[group_concat]]></category>
		<category><![CDATA[pager]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=625</guid>
		<description><![CDATA[Many out there will have different ideas about this, some using procs, some using a function, others using a shell script. Well I didn&#8217;t want to spend much time on it so decided a group_concat(concat would be enough. There is no genius, rather laziness :) but what if you have a hundred databases and you [...]]]></description>
			<content:encoded><![CDATA[<p>Many out there will have different ideas about this, some using procs, some using a function, others using a shell script. Well I didn&#8217;t want to spend much time on it so decided a group_concat(concat would be enough.<br />
There is no genius, rather laziness :) but what if you have a hundred databases and you want to drop them all?<br /></p>
<pre class="brush:sql">
mysql Thu Mar  3 13:50:06 2011 &gt; pager sed 's/,/ /g'
PAGER set to 'sed 's/,/ /g''
mysql Thu Mar  3 13:50:32 2011 &gt; select group_concat(concat('drop database ',SCHEMA_NAME,';')) from information_schema.schemata where SCHEMA_NAME !='mysql' and SCHEMA_NAME !='information_schema';
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| group_concat(concat('drop database ' SCHEMA_NAME ';'))                                                                                                                                                  |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| drop database abc; drop database def; drop database ghi; drop database jkl; drop database mno; drop database pqr; drop database stu; drop database vwx; drop database yz; |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql Thu Mar  3 13:50:34 2011 &gt; drop database abc; drop database def; drop database ghi; drop database jkl; drop database mno; drop database pqr; drop database stu; drop database vwx; drop database yz;
Query OK, 42 rows affected (2.37 sec)

Query OK, 101 rows affected (4.25 sec)

Query OK, 3 rows affected (0.09 sec)

Query OK, 2 rows affected (0.09 sec)

Query OK, 26 rows affected (0.72 sec)

Query OK, 2 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 3 rows affected (0.12 sec)

Query OK, 160 rows affected (7.98 sec)

mysql Thu Mar  3 13:50:55 2011 &gt; nopager
PAGER set to stdout
mysql Thu Mar  3 13:51:02 2011 &gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2011/03/removing-all-databases-from-a-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MariaDB makes it to Solaris 10 x86</title>
		<link>http://mysqlpreacher.com/wordpress/2011/02/mariadb-makes-it-to-solaris-10-x86/</link>
		<comments>http://mysqlpreacher.com/wordpress/2011/02/mariadb-makes-it-to-solaris-10-x86/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 18:21:14 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[monty porgram]]></category>
		<category><![CDATA[mpab]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=618</guid>
		<description><![CDATA[Monty Program AB have recently released a tar.gz package of MariaDB for Solaris 10 x86, something I have been waiting on for a while. Thank you guys! Download here &#8212; Note that this is a beta release so use with caution and not in prod unless you know what you are doing or nuts. If [...]]]></description>
			<content:encoded><![CDATA[<p>Monty Program AB have recently released a tar.gz package of MariaDB for Solaris 10 x86, something I have been waiting on for a while. Thank you guys!</p>
<p><a href="http://askmonty.org/wiki/MariaDB:Download:MariaDB_5.1.53" target="_blank">Download here</a> &#8212; Note that this is a beta release so use with caution and not in prod unless you know what you are doing or nuts. If you have any issues MPAB can be contacted <a href="http://montyprogram.com/contact/" target="_blank">here</a>.</p>
<pre class="brush:shell">[mysql@dc /mysql/mariadb-5.1.53-solaris10-i386 03:15:27]$  uname -a
SunOS dc 5.10 Generic_141415-08 i86pc i386 i86pc
[mysql@dc /mysql/mariadb-5.1.53-solaris10-i386 03:15:33]$  bin/mysql -uroot
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 5.1.53-MariaDB-log Source distribution

This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]&gt; use test;
Database changed
MariaDB [test]&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2011/02/mariadb-makes-it-to-solaris-10-x86/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL community blogging – PlanetMySQL &#8211; Part 2</title>
		<link>http://mysqlpreacher.com/wordpress/2011/01/mysql-community-blogging-%e2%80%93-planetmysql-part-2/</link>
		<comments>http://mysqlpreacher.com/wordpress/2011/01/mysql-community-blogging-%e2%80%93-planetmysql-part-2/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 11:13:45 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[planetmysql]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=593</guid>
		<description><![CDATA[After last week&#8217;s post about bloggin trends, this week I will go through the most active bloggers over the years as well as particularly for 2010. What is the range of time analysed here? mysql &#62; select min(date_time), max(date_time) from blogs; +---------------------+---------------------+ &#124; min(date_time) &#124; max(date_time) &#124; +---------------------+---------------------+ &#124; 2004-03-04 19:47:00 &#124; 2011-01-07 13:22:00 &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>After last week&#8217;s post about <a href="http://mysqlpreacher.com/wordpress/2011/01/mysql-community-blogging-planetmysql/" target="_blank">bloggin trends</a>, this week I will go through the most active bloggers over the years as well as particularly for 2010.</p>
<p>What is the range of time analysed here?</p>
<pre class="brush:sql">mysql &gt;  select min(date_time), max(date_time) from blogs;
+---------------------+---------------------+
| min(date_time)      | max(date_time)      |
+---------------------+---------------------+
| 2004-03-04 19:47:00 | 2011-01-07 13:22:00 |
+---------------------+---------------------+
1 row in set (0.04 sec)</pre>
<p>How many blog posts in the above period (almost 7years)?</p>
<pre class="brush:sql">mysql &gt;  select count(*) from blogs;
+----------+
| count(*) |
+----------+
|    21698 |
+----------+
1 row in set (0.00 sec)</pre>
<p>How many authors have contributed to planetmysql?</p>
<pre class="brush:sql">mysql &gt;  select count(distinct(author)) from blogs;
+-------------------------+
| count(distinct(author)) |
+-------------------------+
|                     538 |
+-------------------------+
1 row in set (0.03 sec)</pre>
<p>How does planetmysql distinct type of bloggers?</p>
<pre class="brush:sql">mysql &gt; select distinct(type) from blogs;
+---------------+
| type          |
+---------------+
| Employee_Team |
| Community     |
| Team          |
| Employee      |
| Official      |
+---------------+
5 rows in set (0.03 sec)</pre>
<p>How many blog posts per type (group)?</p>
<p><strong>*** Please note that when a MySQL, Sun, Oracle employee changes status, any blog posts by that person will shift to a new group.</strong></p>
<pre class="brush:sql">mysql &gt;  select distinct(type), count(*) from blogs group by type order by 2 desc;
+---------------+----------+
| type          | count(*) |
+---------------+----------+
| Community     |    13699 |
| Team          |     3811 |
| Employee      |     3164 |
| Official      |      592 |
| Employee_Team |      432 |
+---------------+----------+
5 rows in set (0.02 sec)</pre>
<p>How many authors per type (group)?</p>
<pre class="brush:sql">mysql &gt;  select type,count(distinct(author)) from blogs group by type order by 2 desc;
+---------------+-------------------------+
| type          | count(distinct(author)) |
+---------------+-------------------------+
| Community     |                     345 |
| Employee      |                     102 |
| Team          |                      64 |
| Official      |                      44 |
| Employee_Team |                      18 |
+---------------+-------------------------+
5 rows in set (0.28 sec)</pre>
<p>Of course who are the most active 10 bloggers?</p>
<pre class="brush:sql">mysql &gt;  select author, count(*) from blogs group by author order by 2 desc limit 10;

+------------------------+----------+
| author                 | count(*) |
+------------------------+----------+
| MySQL Performance Blog |      843 |
| Open Query             |      582 |
| Ronald Bradford        |      570 |
| Baron Schwartz (xaprb) |      485 |
| Giuseppe Maxia         |      478 |
| Brian Aker             |      476 |
| The 451 Group          |      431 |
| Sheeri K. Cabral       |      422 |
| Stewart Smith          |      398 |
| Matt Asay              |      390 |
+------------------------+----------+
10 rows in set (0.03 sec)</pre>
<p>Ok lets see the top 20 individuals</p>
<p>Since some of the most active bloggers were at some point employed by MySQL/Sun/Oracle or by one of the support companies they might feature in the teams groups too so the below solves the issue:</p>
<pre class="brush:sql">mysql &gt;  create temporary table t1( author varchar(255), ct int) engine=myisam;
Query OK, 0 rows affected (0.01 sec)

mysql &gt;  insert into t1 select author, count(*) from blogs where (type='Community' or type='Employee') and date_time &gt; '2010' group by author order by 2 desc limit 20;
Query OK, 20 rows affected (0.03 sec)
Records: 20  Duplicates: 0  Warnings: 0

mysql &gt;  select b.author,count(*) from blogs b, t1 where b.author=t1.author group by b.author order by 2 desc;
+------------------------+----------+
| author                 | count(*) |
+------------------------+----------+
| Ronald Bradford        |      570 |
| Baron Schwartz (xaprb) |      485 |
| Giuseppe Maxia         |      478 |
| Brian Aker             |      476 |
| Sheeri K. Cabral       |      422 |
| Stewart Smith          |      398 |
| Matt Asay              |      390 |
| Zack Urlocker          |      356 |
| Colin Charles          |      330 |
| Frank Mash             |      315 |
| Kaj Arno               |      312 |
| Lenz Grimmer           |      307 |
| Jay Pipes              |      256 |
| Mark Callaghan         |      239 |
| Markus Popp            |      196 |
| Mike Hillyer           |      184 |
| Mike Kruckenberg       |      179 |
| Matt Reid              |      179 |
| Reggie Burnett         |      175 |
| Roland Bouman          |      165 |
+------------------------+----------+
20 rows in set (0.08 sec)</pre>
<p>Please note that quantity is not equal to quality so you have to judge for yourself what is good for you and what is not.</p>
<p>Ok lets have a look at 2010 blog count:</p>
<pre class="brush:sql">mysql &gt;  truncate t1;
Query OK, 0 rows affected (0.04 sec)

mysql &gt;   insert into t1 select author, count(*) from blogs where (type='Community' or type='Employee') and date_time &gt; '2009-12-31' and date_time &lt; '2011-01-01' group by author order by 2 desc limit 20;
Query OK, 20 rows affected (0.03 sec)
Records: 20  Duplicates: 0  Warnings: 0

mysql &gt;  select b.author,count(*) from blogs b, t1 where b.author=t1.author and date_time &gt; '2009-12-31' and date_time &lt; '2011-01-01' group by b.author order by 2 desc;
+------------------------+----------+
| author                 | count(*) |
+------------------------+----------+
| Ronald Bradford        |       99 |
| Baron Schwartz (xaprb) |       98 |
| Shlomi Noach           |       61 |
| Matt Reid              |       61 |
| Andrew Morgan          |       60 |
| Stewart Smith          |       58 |
| Anders Karlsson        |       55 |
| Giuseppe Maxia         |       53 |
| Sheeri K. Cabral       |       45 |
| Henrik Ingo            |       44 |
| Dave Stokes            |       42 |
| Florian G. Haas        |       39 |
| Mark Callaghan         |       32 |
| Brian Aker             |       32 |
| Lenz Grimmer           |       31 |
| Colin Charles          |       31 |
| Ansgar Becker          |       29 |
| Matt Mullenweg         |       28 |
| Simon Mudd             |       28 |
| Darren Cassar          |       26 |
+------------------------+----------+
20 rows in set (0.04 sec)</pre>
<p>More analysis of the feed will follow.<br />
Because Sharing is Caring!</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2011/01/mysql-community-blogging-%e2%80%93-planetmysql-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

