<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;CkEMRnk9eSp7ImA9WhVUFUU.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841</id><updated>2012-05-21T07:11:27.761+01:00</updated><category term="linux" /><category term="idea" /><category term="business" /><category term="Microsoft" /><category term="MySQL" /><category term="Programming Lanugage" /><category term="ETL" /><category term="SQL" /><category term="Email" /><category term="China" /><category term="pentaho" /><category term="informatica" /><category term="Jobs" /><category term="Windows" /><category term="TMPFS" /><category term="Security" /><category term="MariaDB" /><category term="MS SQL" /><category term="open source" /><category term="federated tables" /><category term="Oracle" /><category term="data warehousing" /><category term="Google" /><category term="triggers" /><category term="decision tables" /><category term="PHP" /><category term="Views" /><category term="configuration-management" /><category term="event-driven publishing" /><category term="Data" /><category term="talend" /><category term="Agile" /><category term="business rules" /><category term="Locks" /><category term="DBA" /><category term="Indexes" /><category term="Decision tree" /><category term="ubuntu" /><category term="caching" /><category term="Health" /><category term="Data mining" /><category term="expert system" /><category term="database" /><category term="Excel" /><title>Indexing and Caching</title><subtitle type="html">MySQL Expert UK</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>110</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/WhenPetProjectsBiteBack" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="whenpetprojectsbiteback" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">WhenPetProjectsBiteBack</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;C0MEQX4-eSp7ImA9WhVXGUs.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-6570553005107906547</id><published>2012-04-19T22:25:00.001+01:00</published><updated>2012-04-20T23:36:40.051+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-20T23:36:40.051+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MariaDB" /><category scheme="http://www.blogger.com/atom/ns#" term="business rules" /><title>MariaDB's Virtual Columns</title><content type="html">I wanted to evaluate MariaDB's virtual column and see if it could store &lt;a href="http://www.jonathanlevin.co.uk/2008/02/using-business-rules-in-mysql-overview.html" target="_blank"&gt;&lt;span style="color: #990000;"&gt;business rules&lt;/span&gt;&lt;/a&gt; next to table data. With virtual columns this could be done and if you specify as 'virtual', would not even take up space on disk.&lt;br /&gt;
&lt;br /&gt;
The imaginary use case is that there is a sales team in a company and you would like to evaluate if a particular salesperson is&amp;nbsp;eligible&amp;nbsp;for a bonus. In order to get a bonus, you need to sell above the average for the day and be in the top 5 amongst the salespeople.&lt;br /&gt;
&lt;br /&gt;
So here is what I did:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
MariaDB [test]&amp;gt; create table salespeople (id int unsigned not null auto_increment primary key, salesperson_id int unsigned not null , `date` datetime not null default 0, sold decimal(15,2) not null default 0, day_avg decimal(15,2) not null default 0, &amp;nbsp;&lt;b&gt;above_avg char(1) as (if(sold&amp;gt;day_avg,'Y','N')) virtual&lt;/b&gt;);&lt;br /&gt;
Query OK, 0 rows affected (0.02 sec)&lt;/blockquote&gt;
So far so good.&lt;br /&gt;
&lt;blockquote&gt;
&amp;nbsp;MariaDB [test]&amp;gt; insert into salespeople(salesperson_id, `date`, sold, day_avg) values (1,now(),300,150);&lt;br /&gt;
Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
MariaDB [test]&amp;gt; select * from salespeople;&lt;br /&gt;
+----+----------------+---------------------+--------+---------+-----------+&lt;br /&gt;
| id | salesperson_id | date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| sold &amp;nbsp; | day_avg | above_avg |&lt;br /&gt;
+----+----------------+---------------------+--------+---------+-----------+&lt;br /&gt;
| &amp;nbsp;1 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 | 2012-04-19 13:16:32 | 300.00 | &amp;nbsp;150.00 | Y &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;br /&gt;
+----+----------------+---------------------+--------+---------+-----------+&lt;br /&gt;
1 row in set (0.00 sec)&lt;/blockquote&gt;
Cool, just like mashing a view into a table.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
MariaDB [test]&amp;gt; update salespeople set sold = 149 where id = 1;&lt;br /&gt;
Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
Rows matched: 1 &amp;nbsp;Changed: 1 &amp;nbsp;Warnings: 0&lt;br /&gt;
MariaDB [test]&amp;gt; select * from salespeople;&lt;br /&gt;
+----+----------------+---------------------+--------+---------+-----------+&lt;br /&gt;
| id | salesperson_id | date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| sold &amp;nbsp; | day_avg | above_avg |&lt;br /&gt;
+----+----------------+---------------------+--------+---------+-----------+&lt;br /&gt;
| &amp;nbsp;1 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 | 2012-04-19 13:59:57 | 149.00 | &amp;nbsp;150.00 | N &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;br /&gt;
+----+----------------+---------------------+--------+---------+-----------+&lt;br /&gt;
1 row in set (0.00 sec)&lt;/blockquote&gt;
&lt;br /&gt;
Works again. No triggers for UPDATE needed.&lt;br /&gt;
Now lets try to add another business rule:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
MariaDB [test]&amp;gt; drop table salespeople;&lt;br /&gt;
Query OK, 0 rows affected (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
MariaDB [test]&amp;gt; create table salespeople (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; id int unsigned not null auto_increment primary key,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; salesperson_id int unsigned not null,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; `date` datetime not null default 0,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; sold decimal(15,2) not null default 0,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; day_avg decimal(15,2) not null default 0,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; above_avg char(1) as (if(sold&amp;gt;day_avg,'Y','N')) virtual,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; day_position int not null default 0,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; &lt;b&gt;give_bonus char(1) as (if(above_avg='Y' and day_position between 1 and 5,'Y','N') )virtual&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; );&lt;br /&gt;
ERROR 1900 (HY000): A computed column cannot be based on a computed column&lt;br /&gt;
MariaDB [test]&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
DOH! &amp;gt;.&amp;lt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ADDITION:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I have found a way to store more business rules with the limitation of not being able to use another virtual column to "build" a more complex rule set:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
MariaDB [test]&amp;gt; create table salespeople (&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; id int unsigned not null auto_increment primary key,&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; salesperson_id int unsigned not null,&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; `date` datetime not null default 0,&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; sold decimal(15,2) not null default 0,&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; day_avg decimal(15,2) not null default 0,&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; day_position int not null default 0,&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; bonus_amount decimal(15,2) as (&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; &lt;b&gt;case when sold&amp;gt;day_avg and day_position between 1 and 5&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; &amp;nbsp;&lt;b&gt;then 0.2 * (sold - day_avg) #20% bonus&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; &lt;b&gt;when sold&amp;gt;day_avg and day_position &amp;gt;5&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; &lt;b&gt;&amp;nbsp;then 0.05 * (sold - day_avg) #5% bonus&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; &lt;b&gt;else 0&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; &lt;b&gt;end )virtual&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; -&amp;gt; );&lt;br /&gt;Query OK, 0 rows affected (0.75 sec)&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
MariaDB [test]&amp;gt; insert into salespeople(salesperson_id, `date`, sold, day_avg, day_position) values (1,curdate(),300,150,3);&lt;br /&gt;Query OK, 1 row affected (0.01 sec)&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
MariaDB [test]&amp;gt; select * from salespeople;&lt;br /&gt;+----+----------------+---------------------+--------+---------+--------------+--------------+&lt;br /&gt;| id | salesperson_id | date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| sold &amp;nbsp; | day_avg | day_position | bonus_amount |&lt;br /&gt;+----+----------------+---------------------+--------+---------+--------------+--------------+&lt;br /&gt;| &amp;nbsp;1 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 | 2012-04-20 00:00:00 | 300.00 | &amp;nbsp;150.00 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30.00 |&lt;br /&gt;+----+----------------+---------------------+--------+---------+--------------+--------------+&lt;br /&gt;1 row in set (0.00 sec)&lt;/blockquote&gt;
&lt;div&gt;
In the above example, the actual bonus amount was calculated.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-6570553005107906547?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/6570553005107906547/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=6570553005107906547" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/6570553005107906547?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/6570553005107906547?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2012/04/mariadbs-virtual-columns.html" title="MariaDB's Virtual Columns" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>6</thr:total></entry><entry gd:etag="W/&quot;DUIBQno4fCp7ImA9WhVQGU8.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-5660762681154467437</id><published>2012-04-09T00:25:00.000+01:00</published><updated>2012-04-09T00:25:53.434+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-09T00:25:53.434+01:00</app:edited><title>How to get a query-digest report from TCPdump on a set time</title><content type="html">&lt;b&gt;Note to self&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Getting a query-digest report for 20 seconds worth of tcp traffic on linux&lt;br /&gt;
(no special slow log/microslow patch needed):&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
tcpdump -s 65535 -x -nn -q -tttt -i any -c 99999 port 3306 | pt-query-digest --type tcpdump --run-time 20s&lt;/blockquote&gt;
&lt;br /&gt;
thanks to &lt;a href="http://dba.stackexchange.com/questions/8359/mysql-general-query-log-performance-effects" rel="nofollow" target="_blank"&gt;aaron brown&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Connect to&amp;nbsp;&lt;a href="https://github.com/box/Anemometer/wiki" target="_blank"&gt;&lt;b&gt;Anemometer&lt;/b&gt;&lt;/a&gt;&amp;nbsp;instead of using slow log&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
#crontab entry&lt;br /&gt;*/5 * * * * tcpdump -s 65535 -x -nn -q -tttt -i any -c 99999 port 3306 | pt-query-digest --type tcpdump --run-time 20s --user=anemometer --password=superSecurePass --review h=db.example.com,D=slow_query_log,t=global_query_review --review-history h=db.example.com,D=slow_query_log,t=global_query_review_history --no-report --limit=0% --filter=" \$event-&amp;gt;{Bytes} = length(\$event-&amp;gt;{arg})"&amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-5660762681154467437?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/5660762681154467437/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=5660762681154467437" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/5660762681154467437?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/5660762681154467437?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2012/04/how-to-get-query-digest-report-from.html" title="How to get a query-digest report from TCPdump on a set time" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEUHRn4_cCp7ImA9WhVQFks.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-2833649516050674451</id><published>2012-04-05T22:35:00.000+01:00</published><updated>2012-04-05T23:50:37.048+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-05T23:50:37.048+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="Indexes" /><title>Mastering MySQL Indexing</title><content type="html">&lt;span style="font-family: Verdana, sans-serif;"&gt;Indexes are tricky things. In my experience, indexes are added whenever SQL queries are too slow. This makes sense. However, sometimes these indexes were added without being thought through enough (I am guilty of this). Sometimes they were thought through, but the table itself now has so many indexes that the optimizer doesn&amp;#39;t know which one to choose from. &lt;/span&gt;&lt;br&gt;
&lt;span style="font-family: Verdana, sans-serif;"&gt;The overhead of indexes greatly effects tables that need to be written to or altered often (even &lt;a href="http://whyjava.wordpress.com/2011/12/03/how-mongodb-writeread-speed-varies-with-or-without-index-on-a-field/" rel="nofollow" target="_blank"&gt;indexes on NoSQL database&lt;/a&gt; greatly effect writes).&lt;/span&gt;&lt;br&gt;
&lt;span style="font-family: Verdana, sans-serif;"&gt;Over indexed tables inflate the database size dramatically which adds to people&amp;#39;s concerns that the database becomes unwieldy.&lt;/span&gt;&lt;br&gt;
&lt;div&gt;
&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;a href="http://www.jonathanlevin.co.uk/2012/04/mastering-mysql-indexing.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-2833649516050674451?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/2833649516050674451/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=2833649516050674451" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/2833649516050674451?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/2833649516050674451?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2012/04/mastering-mysql-indexing.html" title="Mastering MySQL Indexing" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-hY6sh1ooqfs/T3lwjmjnwwI/AAAAAAAAJdY/QxVdGyP4d_8/s72-c/MySQL+Indexing+Mastery+Part+1+-+chart+(1).png" height="72" width="72" /><thr:total>6</thr:total></entry><entry gd:etag="W/&quot;CkUGQ3w5fip7ImA9WhVREko.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-1132835583541945681</id><published>2012-03-20T19:03:00.000Z</published><updated>2012-03-20T19:03:42.226Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-20T19:03:42.226Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="DBA" /><title>Why You Need a Part-Time Remote MySQL Expert</title><content type="html">When I thought to start to write this post, I was thinking about all the logical reasons why you would consider hiring a part-time remote MySQL database administrator or MySQL expert.&lt;br /&gt;
It then&amp;nbsp;occurred&amp;nbsp;to me that most of the readers, who are reading this post now, already know or can imagine the benefits of hiring a DBA to take care of their system.&lt;br /&gt;
&lt;br /&gt;
So what I want to offer is a case based on the emotional benefits and value a part-time DBA can offer you and your business.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-jDVfo-X7z8I/T2jUF9MYtoI/AAAAAAAAJWg/MBfZMiVVKxk/s1600/doctor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-jDVfo-X7z8I/T2jUF9MYtoI/AAAAAAAAJWg/MBfZMiVVKxk/s1600/doctor.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
1) &lt;b&gt;Peace of Mind&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
A DBA can offer you peace of mind that one of your core business components is being taken care of. It is like maintaining your house gas boiler or car every now to keep it running in good working order and preventing it from blowing up. Except that in this example, if it does break, you can't use the entire house or car until they are fixed.&lt;br /&gt;
What is important to remember here is that there is no immediate justification for spending money on maintenance. There is even a sense of loss when you do spend the money without seeing any value from it. You are left in a mental tug-of-war between the possibility of downtime and loss of profits to the immediate hit to your cash flow.&lt;br /&gt;
&lt;br /&gt;
What usually helps here is to calculate the cost of downtime with the estimated time and effort to recover from it divided by the chance that it will happen.&lt;br /&gt;
&lt;br /&gt;
In the event that your main database servers breaks down:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;How much money are you losing from sales?&lt;/li&gt;
&lt;li&gt;How much money are you losing from possible future sales? (For example, sales people and marketeers cannot send people to the website or loss of reputation)&lt;/li&gt;
&lt;li&gt;How much money will it cost to get people (even at the dead of night) to resolve the problem? (people multiplied by hours or overtime hours)&lt;/li&gt;
&lt;li&gt;How much disruption will it cause later on? (For example, sales people need to speak with clients to assure them everything is OK for two days instead of finding new clients)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
Divided by - the chance that your database servers will break down.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Are we expecting any seasonal bursts of traffic and will the database servers handle it?&lt;/li&gt;
&lt;li&gt;Will the hardware that the database server sits on hold up in the next 6 months?&lt;/li&gt;
&lt;li&gt;How many single-points-of-failure are there in the environment where the database servers are?&lt;/li&gt;
&lt;li&gt;How many people have DROP TABLE access to your servers and how often to people run "heavy" reporting queries on them?&lt;/li&gt;
&lt;li&gt;How high is your developers skill level when it comes to writing efficient queries that prevent high database usage? (When releasing a new product or feature)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Once you answered all (or some) of those questions and jotted down some numbers, you will then have a figure of how much money you should spend to prevent downtime. This is a very basic risk management formula for managers and will allow you to get some perspective.&lt;br /&gt;
The mental tug-of-war can take a break as you are now allocating resources for something you planned a head of time.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
2) &lt;b&gt;Preventing loss of confidence&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
More often then not, I see a lot of small companies have people maintain their databases who do not have a lot of expertise to do it. Typically, if you have some developers, you ask one of them to do it. If you have a system administrator then that usually falls under that responsibility.&lt;br /&gt;
&lt;br /&gt;
What happens then is that those people (usually, but not always) not fully understand their databases and just "keep them running". If something comes up that is a bit out of the ordinary then things start to get stressful.&lt;br /&gt;
&lt;br /&gt;
I've even seen the database becomes the "don't touch it or it will break" system in the company.&lt;br /&gt;
At that point, you lose confidence in your system and prefer to not have to deal with it as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) &lt;b&gt;Energy, Focus and Flow&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When you have people with database expertise on hand, you can solve database related problems very quickly. Problems that were once difficult and complicated suddenly become straight forward.&lt;br /&gt;
For example, instead of having meetings discussing how to implement a very data intensive operation in the best way, you now have someone that can provide a quick answer or at least a direction to help implement it based on best practice and experience.&lt;br /&gt;
Your team can become more cross-functional as the expertise gets shared and solutions come more quickly.&lt;br /&gt;
You feel more in a "flow" - that things are moving in the right direction. You can focus on things which you would rather focus on you feel more energetic because of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) &lt;b&gt;Trust, Knowledge and Speed&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Having an expert in your business and part of your team is very comforting. The more this expert is involved your business, the more this expert knows, understands and appreciate how your business runs and solves theirs problems.&amp;nbsp;There is a cost benefit of having someone you trust and is knowledgeable about your business when you compare it to:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Finding a new expert&amp;nbsp;(Possible additional fees for system or agent that found the expert).&lt;/li&gt;
&lt;li&gt;Evaluating the person is in fact, an expert in their field.&lt;/li&gt;
&lt;li&gt;Explaining what the business problem is&lt;/li&gt;
&lt;li&gt;Double-checking if their solution does work or fully solves your problem.&lt;/li&gt;
&lt;li&gt;If you are not happy with them, go to step 1.&lt;/li&gt;
&lt;li&gt;If there was a misunderstanding in communication, go to step 3&lt;/li&gt;
&lt;li&gt;Implement solution&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
Put a price on each step and compare it to writing an email to your expert saying "we have a problem with that thing we spoke about a while back. Can you please take a look at it?" &lt;br /&gt;
&lt;br /&gt;
In fact, I would go one step further. If your expert is part of your team and they "own" and are responsible for your database system, there is a good chance that they would have come to you after finding the problem themselves and with a possible solution.&lt;br /&gt;
&lt;br /&gt;
I never fully appreciated outsourcing a lot of core parts of a business to one-time development shops. I believe there is valuable business-knowledge that gets lost and that the additional overhead to manage everything becomes very high.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I truly hope that this post may benefit people by giving them peace of mind, confidence and a clear direction that will help them with their business and make it more enjoyable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-1132835583541945681?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/1132835583541945681/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=1132835583541945681" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/1132835583541945681?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/1132835583541945681?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2012/03/why-you-need-part-time-remote-mysql.html" title="Why You Need a Part-Time Remote MySQL Expert" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-jDVfo-X7z8I/T2jUF9MYtoI/AAAAAAAAJWg/MBfZMiVVKxk/s72-c/doctor.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkcFSX88fip7ImA9WhVSFkk.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-9156787978322898511</id><published>2012-03-09T17:14:00.002Z</published><updated>2012-03-13T13:06:58.176Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-13T13:06:58.176Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>Parsing a Set in SQL</title><content type="html">I was trying to parse the data from the &lt;a href="http://cpe.mitre.org/" target="_blank"&gt;common platform enumeration&lt;/a&gt; which is a big dictionary of all or most of commercially or freely available applications, operating systems and hardware (the hardware part I didn't really understand).&lt;br /&gt;
&lt;br /&gt;
Here is an example for "Microsoft Access 2000 sp2"&lt;br /&gt;
cpe:/a:microsoft:access:2000:sp2&lt;br /&gt;
&lt;br /&gt;
As you can see, the data is&amp;nbsp;separated&amp;nbsp;by colons.&lt;br /&gt;
To get the parts that I want in that string, I used the following SQL statement:&lt;br /&gt;
&lt;br /&gt;
*edit from Scot's comment*&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-small;"&gt;mysql&amp;gt; set @v="cpe:/a:microsoft:access:2000:sp2";&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-small;"&gt;mysql&amp;gt; set @p=2 /*the part I want */;&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-small;"&gt;mysql&amp;gt; SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(@v,':',@p),':',-1);&lt;br /&gt;+---------------------------------------------------------------------+&lt;br /&gt;|&amp;nbsp;&lt;/span&gt;
&lt;span style="font-size: x-small;"&gt;SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(@v,':',@p),':',-1);&lt;/span&gt;&amp;nbsp;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;|&lt;br /&gt;+---------------------------------------------------------------------+&lt;br /&gt;| /a &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;+---------------------------------------------------------------------+&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-small;"&gt;mysql&amp;gt; set @p=4;&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-small;"&gt;mysql&amp;gt;&amp;nbsp;&lt;/span&gt;
&lt;span style="font-size: x-small;"&gt;SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(@v,':',@p),':',-1)&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;;&lt;br /&gt;+---------------------------------------------------------------------+&lt;br /&gt;| reverse(SUBSTRING_INDEX(reverse(SUBSTRING_INDEX(@v,':',@p)),':',1)) |&lt;br /&gt;+---------------------------------------------------------------------+&lt;br /&gt;| access &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br /&gt;+---------------------------------------------------------------------+&lt;br /&gt;1 row in set (0.00 sec)&lt;/span&gt;&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Hope someone else finds this useful..&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-9156787978322898511?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/9156787978322898511/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=9156787978322898511" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/9156787978322898511?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/9156787978322898511?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2012/03/parsing-set-in-sql.html" title="Parsing a Set in SQL" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DkYASHc-fip7ImA9WhVSFkk.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-4540228551685922958</id><published>2012-03-09T13:33:00.000Z</published><updated>2012-03-13T13:09:09.956Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-13T13:09:09.956Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><title>McAfee MySQL Audit Plugin</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.mcafee.com/img/logo-mcafee.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://www.mcafee.com/img/logo-mcafee.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I'm work at McAfee at the moment and I stumbled across this:&lt;br /&gt;
&lt;br /&gt;
They have a free (GNU General&amp;nbsp;Public License according to the download) MySQL plugin for auditing MySQL -&amp;nbsp;&lt;a href="https://github.com/mcafee/mysql-audit/downloads"&gt;https://github.com/mcafee/mysql-audit/downloads&lt;/a&gt;&lt;br /&gt;
(yay, for using github)&lt;br /&gt;
&lt;br /&gt;
They also have an &lt;a href="http://www.businesswire.com/news/mcafee/20120228005446/en/McAfee-Database-Security-Solution-Offers-Businesses-Sizes"&gt;enterprise-level database security product&lt;/a&gt; which of course is not free (no idea how much) and a video explaining what it does &lt;a href="http://link.brightcove.com/services/player/bcpid65694806001?bctid=1479401681001"&gt;can be found here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Another MySQL security company is, of course,&amp;nbsp;&lt;a href="http://www.greensql.net/"&gt;GreenSQL&lt;/a&gt; with their open source and commercial SQL firewall.
&lt;br /&gt;
&lt;br /&gt;
I did evaluate GreenSQL once and recommended it to my boss at the time, but his reaction was:&lt;br /&gt;
"Well, its your job to secure MySQL, innit?"&lt;br /&gt;
&lt;br /&gt;
Hopefully, other DBAs will have more luck then I had recommending security products where security is important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-4540228551685922958?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/4540228551685922958/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=4540228551685922958" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/4540228551685922958?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/4540228551685922958?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2012/03/mcafee-mysql-audit-plugin.html" title="McAfee MySQL Audit Plugin" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DkcDQXo5eip7ImA9WhVSFkk.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-4706493719815350561</id><published>2012-02-22T20:15:00.001Z</published><updated>2012-03-13T13:07:50.422Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-13T13:07:50.422Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="TMPFS" /><title>Tmpfs with IO_Direct</title><content type="html">bad idea..&lt;br /&gt;
&lt;br /&gt;
tmpdir..&lt;br /&gt;
..on tmpfs&lt;br /&gt;
&lt;br /&gt;
upgrade..&lt;br /&gt;
..to 5.5&lt;br /&gt;
&lt;br /&gt;
default engine..&lt;br /&gt;
..innodb&lt;br /&gt;
&lt;br /&gt;
create..&lt;br /&gt;
..temp tables statements&lt;br /&gt;
&lt;br /&gt;
optimizing my.cnf...&lt;br /&gt;
..io_direct sounds good..&lt;br /&gt;
&lt;br /&gt;
tmpfs..&lt;br /&gt;
..and io_direct&lt;br /&gt;
do not..&lt;br /&gt;
..play well together &lt;br /&gt;
&lt;br /&gt;
..lucky...&lt;br /&gt;
..just slave..&lt;br /&gt;
..had backup&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-4706493719815350561?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/4706493719815350561/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=4706493719815350561" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/4706493719815350561?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/4706493719815350561?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2012/02/tmpfs-with-iodirect.html" title="Tmpfs with IO_Direct" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;DkUGQHg_fCp7ImA9WhVSFkk.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-7406409195557081590</id><published>2012-02-07T12:58:00.000Z</published><updated>2012-03-13T13:10:21.644Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-13T13:10:21.644Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="Locks" /><title>LOAD DATA INFILE to resolve locks</title><content type="html">In relation to &lt;a href="http://www.mysqlperformanceblog.com/2006/07/12/insert-into-select-performance-with-innodb-tables/"&gt;this MPB post&lt;/a&gt;, there is a command to output data into a file and then to load it back into MySQL to resolve locks.&amp;nbsp;(An example of a really big reporting query that could be quite heavy, can be found &lt;a href="http://stackoverflow.com/questions/1414794/create-table-as-select-killing-mysql"&gt;here&lt;/a&gt;.)&lt;br /&gt;
&lt;br /&gt;
There is an issue with outputting&amp;nbsp;data into a file&amp;nbsp;through&amp;nbsp;MySQL if the file already&amp;nbsp;exists. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
mysql&amp;gt; use mysql&lt;br /&gt;
Reading table information for completion of table and column names&lt;br /&gt;
You can turn off this feature to get a quicker startup with -A&lt;br /&gt;
Database changed&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
mysql&amp;gt; select * from user into outfile '/tmp/user.sql';&lt;br /&gt;
Query OK, 10 rows affected (0.00 sec)&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
mysql&amp;gt; select * from user into outfile '/tmp/user.sql';&lt;br /&gt;
ERROR 1086 (HY000): File '/tmp/user.sql' already exists&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
So to resolve this, I played around with the \! command (which lets you run commands on your OS):&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
mysql&amp;gt; \! rm -rf /tmp/user.sql&lt;br /&gt;
mysql&amp;gt; select * from user into outfile '/tmp/user.sql';&lt;br /&gt;
Query OK, 10 rows affected (0.00 sec)&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
mysql&amp;gt; \! rm -rf /tmp/user.sql&lt;br /&gt;
mysql&amp;gt; select * from user into outfile '/tmp/user.sql';&lt;br /&gt;
Query OK, 10 rows affected (0.00 sec)&lt;/blockquote&gt;
&lt;div&gt;
&lt;br class="Apple-interchange-newline" /&gt;&lt;/div&gt;
&lt;div&gt;
This seemed to have worked.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Apart from security issues and OS specific commands, anyone see anything&amp;nbsp;wrong with this approach?&lt;/div&gt;
&lt;div&gt;
Perhaps I should wrap it around in a stored procedure..&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-7406409195557081590?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/7406409195557081590/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=7406409195557081590" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/7406409195557081590?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/7406409195557081590?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2012/02/load-data-infile-to-resolve-locks.html" title="LOAD DATA INFILE to resolve locks" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;DkQBRXY_eip7ImA9WhVSFkk.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-8477740257264898047</id><published>2012-01-15T20:24:00.000Z</published><updated>2012-03-13T13:12:34.842Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-13T13:12:34.842Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows" /><title>Query-Digest on Windows</title><content type="html">The best way to run pt-query-digest is by making absolutely sure it is not running on any server that is even slightly important to production.&lt;br /&gt;
&lt;br /&gt;
I recently had a case where pt-query-digest took up all the memory and swap on a (linux) development server.&amp;nbsp;I think the reason was that the slow log had blob data in it.&lt;br /&gt;
Even though it wasn't a production server, it managed to upset some people.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://strawberryperl.com/images/strawberry.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="194" src="http://strawberryperl.com/images/strawberry.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
So I:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Installed &lt;a href="http://www.chriscalender.com/?p=678"&gt;strawberry perl&lt;/a&gt; on my windows computer&lt;/li&gt;
&lt;li&gt;Downloaded the gzip'd slow log file (using &lt;a href="http://winscp.net/"&gt;WinSCP&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Unzip'd it&lt;/li&gt;
&lt;li&gt;Saved &lt;a href="http://percon.com/get/pt-query-digest"&gt;percon.com/get/pt-query-digest&lt;/a&gt; to a .pl file on my laptop&lt;/li&gt;
&lt;li&gt;Went to &lt;b&gt;start menu&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;In the &lt;b&gt;run&lt;/b&gt; part I typed &lt;b&gt;cmd&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;In the new command window, I typed &lt;b&gt;pt-query-digest.pl slow.log &amp;gt; digest.txt&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
And walla!&lt;br /&gt;
My laptop was a bit hot for a few hours, but nothing crashed and no one was upset.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-8477740257264898047?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/8477740257264898047/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=8477740257264898047" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/8477740257264898047?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/8477740257264898047?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2012/01/query-digest-on-windows.html" title="Query-Digest on Windows" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A08FQX4yfSp7ImA9WhVSFkk.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-3915441484726198690</id><published>2011-12-27T14:41:00.001Z</published><updated>2012-03-13T14:43:30.095Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-13T14:43:30.095Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="Indexes" /><title>Explaining Indexes with a Library Metaphor - Reloaded</title><content type="html">I wanted to build on the &lt;a href="http://www.mysqlperformanceblog.com/2011/08/30/explaining-indexes-with-a-library-metaphor/"&gt;metaphor I used to explain indexes&lt;/a&gt; and continue a bit further into disk and memory usage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sorting without index cards&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Let us say that we would like to get a list of all books written by J.R. Hartley and we would like this list ordered by the most recently published books.&lt;br /&gt;
What we would do is:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Enter the library&lt;/li&gt;
&lt;li&gt;Speak to our trusty librarian about the list that we need&lt;/li&gt;
&lt;li&gt;The librarian would consult his or her index cards and would then give us a list of where all those books are on the shelves in the library.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;We then head over to find those books in the different positions in the library.&lt;/li&gt;
&lt;li&gt;Once located, we can do one of two things in order to sort the books:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;We can get the information we need from the books and simply remember the list and sort it in our heads (in memory)&lt;/li&gt;
&lt;li&gt;We can take all the books over to an available desk (temporary table on disk) then take a pad and pencil and write down that information on it. After that is done, we can sort that list on the pad and produce the list we want.&lt;/li&gt;
&lt;/ol&gt;
&lt;/ul&gt;
&lt;br /&gt;
As you can imagine, doing calculations in memory would be much faster than sitting down next to a table and writing it down. The reasons &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/internal-temporary-tables.html"&gt;why we would prefer to write it down&lt;/a&gt; would be:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;The list of items would be too long to keep in our memory.&lt;/li&gt;
&lt;li&gt;We may need to keep a text that is or may be too long &amp;nbsp;to hold in our memory (such as text or blob datatype).&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Sorting with index cards&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Let us suppose that the piece of information we need is kept within the librarian's index cards.&lt;br /&gt;
What we would then do is:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Enter the library&lt;/li&gt;
&lt;li&gt;Ask for the index cards from the librarian&lt;/li&gt;
&lt;li&gt;Place it on his or her counter and change their positions until they are in the order that we want.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Leave the library with the ordered list that we wanted&lt;/li&gt;
&lt;/ul&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://blogs.fashion.arts.ac.uk/snapshot/files/2007/10/focus1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="240" src="http://blogs.fashion.arts.ac.uk/snapshot/files/2007/10/focus1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;a href="http://blogs.fashion.arts.ac.uk/snapshot/2007/10/24/student-focus-group/"&gt;http://blogs.fashion.arts.ac.uk/snapshot/2007/10/24/student-focus-group/&lt;/a&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
As you can imagine, using indexes to sort the data can be much faster than the alternative.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How can we use indexes to speed up our sorting?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
One example of where you can use indexes to speed up your sorting is by using a &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html"&gt;multi-column index&lt;/a&gt; in your table structure. The index you set should first cover the search condition and then cover the sorting requirement.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
SELECT * FROM table1 WHERE a = 100 ORDER BY b&lt;/div&gt;
&lt;br /&gt;
Your index should be idx_sort(a,b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try it out on your own system and see if you notice any improvements!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-3915441484726198690?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/3915441484726198690/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=3915441484726198690" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/3915441484726198690?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/3915441484726198690?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2011/12/explaining-indexes-with-library.html" title="Explaining Indexes with a Library Metaphor - Reloaded" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A04MQnk8eCp7ImA9WhVSFkk.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-3596544317667707536</id><published>2011-11-27T22:32:00.002Z</published><updated>2012-03-13T14:46:23.770Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-13T14:46:23.770Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="Indexes" /><title>Get the 95% for Your Index Prefix</title><content type="html">I was playing around with an idea recently...&lt;br /&gt;
I wanted to find out, what is the lowest number of characters needed to satisfy 95% of the values in a column?&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Dixon's_Q_test"&gt;95% is to rule out outliers.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/_eGZF7-BSejg/TSUftaajy6I/AAAAAAAAA2o/hWHKFsqSh2w/s400/Outliers.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="198" src="http://4.bp.blogspot.com/_eGZF7-BSejg/TSUftaajy6I/AAAAAAAAA2o/hWHKFsqSh2w/s320/Outliers.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I plan on using this when I want to get a bit agressive with the indexes on a table that gets inserted to very often.&amp;nbsp;But until now, I haven't had a good query to find it quickly.&lt;br /&gt;
&lt;br /&gt;
So, I thought a bit and came up with the following query:&lt;br /&gt;
&lt;br /&gt;
mysql&amp;gt; show create table filenames\G&lt;br /&gt;
*************************** 1. row ***************************&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Table: show_filename&lt;br /&gt;
Create Table: CREATE TABLE `filenames` (&lt;br /&gt;
&amp;nbsp; `id` int(11) NOT NULL,&lt;br /&gt;
&amp;nbsp; `filename` varchar(255) NOT NULL,&lt;br /&gt;
&amp;nbsp; PRIMARY KEY (`id`),&lt;br /&gt;
&amp;nbsp; KEY `filename` (`filename`),&lt;br /&gt;
) ENGINE=InnoDB DEFAULT CHARSET=latin1&lt;br /&gt;
1 row in set (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
mysql&amp;gt; select min(cc.l) as ninty_five_percent (&lt;br /&gt;
select length(filename) as l, count(distinct filename) as c, @ccount := &amp;nbsp;@ccount + count(distinct filename) as t from filenames, (select @ccount := 0) as foo group by length(filename)) as cc where cc.t &amp;gt;= (@ccount*0.95) order by cc.t;&lt;br /&gt;
+---------------------+&lt;br /&gt;
| &amp;nbsp;ninty_five_percent &amp;nbsp; &amp;nbsp;|&lt;br /&gt;
+---------------------+&lt;br /&gt;
| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;48 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;br /&gt;
+---------------------+&lt;br /&gt;
1 row in set (34.67 sec)&lt;br /&gt;
&lt;br /&gt;
I now can run:&lt;br /&gt;
&lt;br /&gt;
ALTER TABLE filenames DROP INDEX `filename`, ADD INDEX `filename`(`filename`(48));&lt;br /&gt;
&lt;br /&gt;
95% may not be the ideal percentage to use, but it probably will reduce the size of outlier values.&lt;br /&gt;
It can take me a while to get a good percentage that reduces the index size, reduce the INSERT/UPDATE overhead, but still give good response time to SELECT queries.&lt;br /&gt;
I'm going to try this query to help me get there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks to Shlomi Noach for his &lt;a href="http://code.openark.org/blog/mysql/slides-from-my-talk-programmatic-queries-things-you-can-code-with-sql"&gt;talk in Percona London&lt;/a&gt;&amp;nbsp;that helped inspire this query.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-3596544317667707536?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/3596544317667707536/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=3596544317667707536" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/3596544317667707536?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/3596544317667707536?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2011/11/get-95-for-your-index-prefix.html" title="Get the 95% for Your Index Prefix" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_eGZF7-BSejg/TSUftaajy6I/AAAAAAAAA2o/hWHKFsqSh2w/s72-c/Outliers.jpg" height="72" width="72" /><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CEUARXs-eCp7ImA9WhdUF08.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-8606285160824808735</id><published>2011-10-04T10:57:00.000+01:00</published><updated>2011-10-04T10:57:24.550+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-04T10:57:24.550+01:00</app:edited><title>Installing Maatkit when you have Perl-DBD-MySQL issues</title><content type="html">Note to self:&lt;br /&gt;
&lt;br /&gt;
If I have a problem installing Maatkit scripts because maybe Percona server created conflicts with dependencies, here is what I did to solve that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;wget http://maatkit.googlecode.com/files/maatkit-7540-1.noarch.rpm&lt;/li&gt;
&lt;li&gt;yum localinstall --nogpgcheck maatkit-7540-1.noarch.rpm --skip-broken&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
On point 2, make sure what you install before you say "yes".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-8606285160824808735?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/8606285160824808735/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=8606285160824808735" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/8606285160824808735?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/8606285160824808735?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2011/10/installing-maatkit-when-you-have-perl.html" title="Installing Maatkit when you have Perl-DBD-MySQL issues" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUEESX84cCp7ImA9WhdREk8.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-7327725950261047108</id><published>2011-08-01T20:40:00.002+01:00</published><updated>2011-08-01T20:40:08.138+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-01T20:40:08.138+01:00</app:edited><title>New Binary Log API</title><content type="html">I am quite excited at the MySQL Labs feature to have a &lt;a href="http://intuitive-search.blogspot.com/2011/07/binary-log-api-and-replication-listener.html"&gt;Binary log API&amp;nbsp;&lt;/a&gt;.&lt;br /&gt;
The reason is that I see this as a possible disk-based queuing system for MySQL.&lt;br /&gt;
&lt;br /&gt;
An example of how you could do this, is instead of having a trigger with its own overhead, you could create a program to parse the binary log and run a trigger yourself a little bit later with no "real-time" overhead. As in, it would be run when the user isn't waiting for it.&lt;br /&gt;
You could also, for another example, develop a program that counts the rows in a table and update memcached directly, instead of querying MySQL for it.&lt;br /&gt;
This can already be done with other queuing systems like Gearman, but with this API, you can develop other APIs or applications on top of it. Like, memcache_table_counter demon.&lt;br /&gt;
&lt;br /&gt;
In any case, it would be very interesting to see how this will turn out.&amp;nbsp;I believe it would largely depend on the community of developers who will use this API.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-7327725950261047108?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/7327725950261047108/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=7327725950261047108" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/7327725950261047108?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/7327725950261047108?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2011/08/new-binary-log-api_01.html" title="New Binary Log API" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DEANQHwyfCp7ImA9WhZSE0w.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-66677176966300468</id><published>2011-03-28T13:53:00.000+01:00</published><updated>2011-03-28T13:53:11.294+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-28T13:53:11.294+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><title>How to Make MySQL Cool Again</title><content type="html">I feel that MySQL has lost its coolness factor.&lt;br /&gt;
Why do I think that?&amp;nbsp;Well, because most people are interested in other things nowadays...&lt;br /&gt;
Other things like NoSQL -&amp;nbsp;&lt;a href="http://www.xtranormal.com/watch/6995033"&gt;It's what all the cool kids are talking about&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
NoSQL is as cool as it is partly because MySQL wasn't performing as fast as some people would have liked and eventually they looked for other alternatives.&lt;br /&gt;
Meaning that MySQL was the default database when people were installing their PHP/Ruby/Java/Python...etc website, but after some time, it got slow and difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Difficult to Maintain (or not Web scale)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Lets try to analyse what "difficult to maintain" really means...&lt;br /&gt;
It could mean any, some or all of the following situations:&lt;br /&gt;
Your website got bigger -&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Immediately (flood of users/went viral) and you had no idea what to do (you are a Facebook app)&lt;/li&gt;
&lt;li&gt;After a short time, but you are working on new features and have no time (your sales/marketing department are ninjas)&lt;/li&gt;
&lt;li&gt;After a long long time (more than likely that you just haven't archived your old data in the last 10 years as well as you have more users now)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Because you added so many features to the site that everything runs at a crawl (forgot to benchmark on hardware or optimize processes for your hardware).&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Who should solve these problems?&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
Well, usually (in the companies I've seen) it mainly falls on the developers and maybe the system administrators.&amp;nbsp;Companies of a certain size don't tend to hire someone specific to maintain the databases as their only purpose in the company.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
Developers (in most cases) just are not interested in this database stuff. Not all of them, but a lot of them that I ran into would much rather discuss design patterns, agile development... and generally solving interesting programming problems.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;System administrators usually have a lot on their plate to be able to mess around with the database beyond the minimum &amp;nbsp;to keep things running.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
Now, I am going to make an assumption that developers either have to solve all or part of the problems that the database causes or get very frustrated with these problems&amp;nbsp;occurring. Probably both.&lt;br /&gt;
&lt;br /&gt;
Web companies put a lot of pressure on these developers to release new features or fix existing bugs. If the developers say that by switching to a different technology, they will get things done faster, there is a certain possibility that these companies will implement those changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;"Big Data"&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
"Big Data" is the new thing. Its interesting and cool. But what is "Big Data"?&lt;br /&gt;
&lt;a href="http://en.wikipedia.org/wiki/Big_data"&gt;Wikipedia&lt;/a&gt; defines it as: "Big data are datasets that grow so large that they become awkward to work with using on-hand database management tools."&lt;br /&gt;
&lt;br /&gt;
So the difference between "Big Data" and a large or very large dataset is if using your DBMS is too awkward to handle it. With a definition like that, it is clear to me why more companies are trying to move away from relational databases.&lt;br /&gt;
&lt;br /&gt;
My understanding of the trend is this: companies with, in their mind, very large datasets (which can honestly range from a main table that is 10Gb to 100Gb, from real life examples) and have a very difficult time maintaining or scaling their database, would (of course) consider themselves to have "Big Data" and look for solutions for it. Considering that its now interesting and cool, why not at least take a look at it and even give it a try in the company?&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Is NoSQL the Enemy?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
NoSQL is not the enemy. Key/Value stores, document-based databases and similar NoSQL databases can be a very good tool for a certain problem.&lt;br /&gt;
We've been using Key/Value stores in memcached for years. Document-based databases can be perfect as a replacement for Entity-Attribute-Value data structures or unstructured data.&lt;br /&gt;
&lt;br /&gt;
There are also companies that their main function is only to process large amounts of data and they do it very well with NoSQL databases with Map/Reduce.&lt;br /&gt;
&lt;br /&gt;
I didn't go into this at all, but for a website with a lot of transactions, NoSQL could also be a very good solution, depending on the situation.&lt;br /&gt;
&lt;br /&gt;
The "enemy" is the hype around NoSQL as the one-size fits all solution and the FUD about scaling MySQL.&lt;br /&gt;
(in my opinion)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;How to Make MySQL Cool Again&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
So without further ado, here is my completely opinionated list of how to make MySQL cool:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;u&gt;Gearman&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I believe this is one of the MAIN things that will make MySQL cool again.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;One of the main problems with MySQL is that it doesn’t do things in parallel very well.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Gearman can work with MySQL to &lt;a href="http://code.google.com/p/shard-query/"&gt;run queries in parallel&lt;/a&gt;. Gearman can also work as an addon to branch out work &lt;a href="http://gearman.org/index.php?id=php_-_feed_fetching_parsing"&gt;once data is updated in the database&lt;/a&gt;. This leaves a space for MySQL to do some very interesting things and doing those things asynchronously.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;With regards to processing “Big Data”, you can always process some parts of the data you need or all the parts at offline times or off peak times. Doing this using Gearman can prove to be very very scalable and efficient.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;&lt;u&gt;Map/Reduce&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
Map/Reduce isn’t just for NoSQL. It can also be used with relational databases. There are already proprietary databases that use some form of Map/Reduce, such as Greenplum, Teradata and Aster.&lt;br /&gt;
&lt;br /&gt;
There is an argument that Map/Reduce can or should be used more for “offline” work, but I do not know enough about that to make a judgement on it.&lt;br /&gt;
&lt;br /&gt;
There is already uses of &lt;a href="http://www.marketwire.com/press-release/LiveRail-Implements-Infobright-and-Hadoop-for-Video-Advertising-Analytics-1411423.htm"&gt;Hadoop with MySQL&lt;/a&gt;&amp;nbsp;and things could get interesting if this trend increases.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Column-Based Storage Engines&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
MySQL has a few of these already as storage engines: &lt;a href="http://www.infinidb.org/"&gt;InfiniDB&lt;/a&gt; and &lt;a href="http://www.infobright.com/"&gt;Infobright&lt;/a&gt;. What these engines do is store the data in a way that allows you to do run queries on large data. These queries are specifically used for reports (these engines are not terribly good at many small insert/deletes). These engines save you from guessing which index to put on where because every column is a sort of index. Lastly, they also make an effort to compress the data.&lt;br /&gt;
&lt;br /&gt;
Now these storage engines are not always that cool, at least not to developers, because they usually require some sort of work on the data so that it can be used efficiently. This work is called ETL (extract, transform and load) and now we’ve stumbled onto the world of Data Warehouses.&lt;br /&gt;
&lt;br /&gt;
Data warehouses have been around for decades and have been a very good solution for querying large data sets for business intelligence.&lt;br /&gt;
The problem is that traditionally, companies who have used business intelligence have been quite big and with a lot of money. The tended to hire database administrators, database developers, data analysts and “power” business users analysts (think experts at Excel and Pivot Tables). Those people are already familiar with Data Warehouses and business intelligence and it won’t be too difficult for them to implement it (albeit it will take them a long time and be expensive).&lt;br /&gt;
&lt;br /&gt;
Startups don’t tend to hire these kinds of people, at least not straight away and are not too keen on the “a long time and expensive” part of the deal.&lt;br /&gt;
Even though there are open source BI suites (&lt;a href="http://www.pentaho.com/"&gt;Pentaho&lt;/a&gt; and &lt;a href="http://www.jaspersoft.com/"&gt;Jaspersoft&lt;/a&gt;) and you can use MySQL or &lt;a href="http://www.postgresql.org/"&gt;Postgres&lt;/a&gt; as well, the knowledge and skill set for implementing business intelligence is limited and possibly expensive.&lt;br /&gt;
&lt;br /&gt;
NoSQL advocates claim that NoSQL with Map/Reduce will give small companies the power to compete with the “Big Boys”. However, I do not see a way for NoSQL databases to give tools to business users to query and analyse data on their own the same way BI suites or even SQL as a language does at the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Play Around with Shiny New Hardware&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
MySQL is getting better and better at scaling on &amp;nbsp;faster hardware. Why not have fun with it and load up on memory or&amp;nbsp;experiment&amp;nbsp;with new storage like RAID, SSDs, &lt;a href="http://www.fusionio.com/"&gt;FusionIO&lt;/a&gt;/&lt;a href="http://www.virident.com/"&gt;Verident&lt;/a&gt; or SANs.&lt;br /&gt;
&lt;br /&gt;
Forget commodity hardware. Adding 32Gb of memory to a server that comes with a default 8Gb nowadays is inexpensive.&lt;br /&gt;
&lt;br /&gt;
It could be quite cool to buy something for a few hundred dollars/pounds and see a dramatic increase in speed on your MySQL server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Have Out-of-the-box Tailored Configuration for MySQL&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
No really. Why can’t the regular installation of MySQL ask you 3-5 questions about “how do you plan to use MySQL?” and then change the my.cnf file accordingly.&lt;br /&gt;
&lt;br /&gt;
It would be kind of like those 3-4 different my.ini files that came/comes with MySQL for Windows.&lt;br /&gt;
Questions can be like “Do you mainly want the database to be transactional?” and “I notice that you have 16Gb of memory, would you like me to allocate 50% of that memory for the database (innodb buffer pool)?”&lt;br /&gt;
You can get a lot of mileage out of MySQL if you just configure it slightly.&lt;br /&gt;
&lt;br /&gt;
It can be quite cool if MySQL “just works” for much longer if configured more suitably to the server it’s on. In addition, you can add to this idea at the end: “MySQL has now been configured to your server. Now you can &lt;a href="http://www.markdrew.co.uk/blog/post.cfm/couchdb-ukcfug"&gt;relax&lt;/a&gt;”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Materialized Views&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
It is apparently a well kept secret in the Web world, but almost all the proprietary databases have something called &lt;a href="http://en.wikipedia.org/wiki/Materialized_view"&gt;Materialized Views&lt;/a&gt; (some not with that exact name).&lt;br /&gt;
What is it? It’s basically a copy of a select query that’s already been processed and is on disk for you to reference. There is no need to generate the query from the main table over and over again. If the data that you need is in the Materialized View, then querying it directly will be (should be) very fast and non-locking to the main table it’s referencing.&lt;br /&gt;
These proprietary databases usually also maintain this view themselves and allow you to specify how often you would like the data to be updated.&lt;br /&gt;
&lt;br /&gt;
So imagine you have a large table where you keep all your orders. This table is inserted to quite often and at the same time, the business users in the company like to run reports on this table. This can cause problems sometimes and usually the way to solve this issue, is to allow the business users to run their reports on a slave database (which is always a good idea).&lt;br /&gt;
If you know that the business users are only interested in the grouped by data of this table for each month, you can compile a separate table with this data which would be much much smaller and faster to generate reports from.&lt;br /&gt;
&lt;br /&gt;
MySQL doesn’t have built in Materialized Views, but luckily, there is &lt;a href="http://code.google.com/p/flexviews/"&gt;Flexviews&lt;/a&gt; which can do the same thing for you.&lt;br /&gt;
In a very short summary, it’s a package that parses your MySQL binary log with PHP (think tail –f on the binlog) and then applies it to the tables which will be written to disk. You can use it to generate the whole table (which would be the same as: CREATE TABLE mv_orders AS SELECT * FROM orders GROUP BY MONTH(`date`),YEAR(`date`);) and you can use it to generate incrementally as I have explained above.&lt;br /&gt;
It’s really not intimidating to use and Justin Swanhart at Percona has recently written some &lt;a href="http://www.mysqlperformanceblog.com/2011/03/25/using-flexviews-part-two-change-data-capture/"&gt;blog posts&lt;/a&gt; to explain how to use it.&lt;br /&gt;
&lt;br /&gt;
For short, it could be quite cool to generate this kind of view quickly and give it to the business users (or even your own reporting application). Everyone is happy and you can back to what you were doing before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Sharding&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Sharding is all the rage and in particularly useful when you do use commodity hardware. While its quite cool to talk about it, implementing it here can actually be a little more work and a little less cool.&lt;br /&gt;
&lt;br /&gt;
I’ll give an example of how application sharding could work:&lt;br /&gt;
Lets say you have your website, everything is running fine apart from this 1 client that really kills your server. So you decide that you will “shard” the data and give this 1 client his own server.&lt;br /&gt;
You then go over all your code and add IF statements to say:&lt;br /&gt;
&lt;blockquote&gt;IF customer_id = 1 THEN use private_server1&lt;br /&gt;
ELSE use regular_server&lt;/blockquote&gt;You then go over all your tables and decide which are “global” tables and should be on both servers, which are primary tables which can be sharded and which are child tables which rely on the primary table.&lt;br /&gt;
You also might like fail-over and redundancy, so you create a Slave server for both servers. Now you have 4 servers and 2 backups that you need to maintain.&lt;br /&gt;
&lt;br /&gt;
There is a &lt;a href="http://www.dbshards.com/"&gt;company that might help you do this&lt;/a&gt;, but from what I saw, they are mainly for Java apps.&lt;br /&gt;
You can also try using &lt;a href="http://forge.mysql.com/wiki/MySQL_Proxy"&gt;MySQL proxy&lt;/a&gt;.&lt;br /&gt;
Whatever you choose to do, you might run into some gotchas.&lt;br /&gt;
&lt;br /&gt;
What you will get is smaller databases that run faster which can be cool and you can definitely go to some conference to talk about it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Tungsten Replicator&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Tungsten Replicator made it on my list because it can solve quite a few scaling problems MySQL can have. The important ones to me are:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Multi-source replication - You can have 1 to many MySQL servers collecting data into 1 "hub" and then replicate that over to the other servers.&lt;/li&gt;
&lt;li&gt;Solve replication lag by "sharding" the replications into several streams. I know quite a lot of companies that split up their databases by which application uses them (functional partitioning) to solve the problem that way.&lt;/li&gt;
&lt;li&gt;The enterprise version allows you to change masters instantly in the event of a crash. Its high availability at a cost but can save you a lot of time and trouble.&lt;/li&gt;
&lt;li&gt;Hidden ETL functionality - Can replicate data from several MySQL DBs (or Postgres) into 1 DB for reporting or back ups.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;I haven't played around with it that much, but it looks to have similar functionality to Flexviews where you basically tail -f the binlogs and then you parse it in some way.&lt;/div&gt;&lt;div&gt;In any case, it's quite cool and there is a lot of blogs and presentations out about it recently.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;MySQL Cluster&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Also on the topic of using commodity hardware, you have MySQL Cluster.&lt;br /&gt;
Not yet as cool to initially set up, but can be very cool for high transactional websites. It has been battle tested by a large number of telecoms companies. MySQL Cluster has also recently received a lot of attention inside Oracle (I believe this is because it’s a bit more difficult to maintain and its easier to sell commercial support for it).&amp;nbsp;New developments to it is to integrate it with memcached directly and easier to work with it using Java.&lt;br /&gt;
&lt;br /&gt;
Personally, I am waiting for MySQL Cluster to get a bit more critical mass. The work on memcached API looks interesting and I also recommended a name change to make it sound cool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Scaling Up MySQL&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you do feel you have “Big Data” with your MySQL databases, please consider doing the following:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Search the Internet – there is a HUGE amount of information available on the internet to help you with your MySQL problems. There is (still) a very friendly community behind MySQL and there are people falling over themselves to help you on &lt;a href="http://www.stackoverflow.com/"&gt;stackoverflow&lt;/a&gt;, &lt;a href="http://www.serverfault.com/"&gt;serverfault&lt;/a&gt; as well as &lt;a href="http://forums.mysql.com/"&gt;MySQL forums&lt;/a&gt; and IRC.&lt;/li&gt;
&lt;li&gt;Hire someone to take care of your MySQL Databases – either hire a full time/part time MySQL DBA or talk to a MySQL consultancy company. Your main options are: &lt;a href="http://www.percona.com/"&gt;Percona&lt;/a&gt;, &lt;a href="http://www.skysql.com/"&gt;SkySQL&lt;/a&gt; (both only support MySQL) and &lt;a href="http://www.pythian.com/"&gt;Pythian&lt;/a&gt;, &lt;a href="http://www.bluegecko.net/"&gt;Blue Gecko&lt;/a&gt; and &lt;a href="http://palominodb.com/"&gt;PalaminoDB&lt;/a&gt; (which do a mixture of MySQL, Oracle and MS SQL). There's also this little known company called &lt;a href="http://www.oracle.com/"&gt;Oracle&lt;/a&gt; which owns &lt;a href="http://www.mysql.com/support/"&gt;MySQL&lt;/a&gt; and supports it.&lt;/li&gt;
&lt;li&gt;Send someone in your company on a MySQL course. Percona and SkySQL do those as well.&lt;/li&gt;
&lt;li&gt;Buy better hardware. Again, get some memory, &amp;nbsp;faster disks or buy a new server entirely. In a lot of cases, this can be the cheapest option if you consider how much lost hours of productivity your developers are wasting trying to tweak the code to your existing MySQL database.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;&lt;b&gt;&lt;i&gt;Disclaimer:&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;All that I have written here is my opinion. There is no hard data supporting my claims. These are just trends that I have noticed and am expressing my thoughts in my blog. I reserve the right to completely change my mind if I or someone else finds new data or different trends.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-size: medium; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Thank you for reading this blog post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-66677176966300468?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/66677176966300468/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=66677176966300468" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/66677176966300468?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/66677176966300468?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2011/03/how-to-make-mysql-cool-again.html" title="How to Make MySQL Cool Again" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>6</thr:total></entry><entry gd:etag="W/&quot;CUQMQXs7eSp7ImA9WhZTFks.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-1330870262557799207</id><published>2011-03-20T23:23:00.000Z</published><updated>2011-03-20T23:23:00.501Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-20T23:23:00.501Z</app:edited><title>MySQL &amp; NoSQL Survey - Results</title><content type="html">Thank you for everyone that participated in the survey.&lt;br /&gt;
The number of participants was 57 and here are the results.&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; {"chartType":"PieChart","chartName":"Chart5","dataSourceUrl":"//spreadsheets0.google.com/a/jonathanlevin.co.uk/tq?key=0AumlInkr1Mq1dGpzV2RremZmQlJQOHZjOGw4enZzWEE&amp;transpose=0&amp;headers=0&amp;range=F1%3AG2&amp;gid=0&amp;pub=1","options":{"fontColor":"#fff","midColor":"#36c","pointSize":"0","headerColor":"#3d85c6","headerHeight":40,"is3D":true,"hAxis":{"maxAlternation":1},"wmode":"opaque","title":"","mapType":"hybrid","isStacked":false,"showTip":true,"displayAnnotations":true,"nonGeoMapColors":["#ff9900","#0000ff","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"dataMode":"markers","colors":["#ff9900","#0000ff","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"smoothLine":false,"maxColor":"#222","lineWidth":"2","labelPosition":"right","fontSize":"14px","hasLabelsColumn":true,"maxDepth":2,"legend":"right","allowCollapse":true,"minColor":"#ccc","width":600,"height":371},"refreshInterval":5} &lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
This is a general trend right across the board. &lt;br /&gt;
32.9% of companies (from people that participated in the survey) use both MySQL and NoSQL in their companies and 67.1% use just MySQL.&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; {"chartType":"AreaChart","chartName":"Chart1","dataSourceUrl":"//spreadsheets0.google.com/a/jonathanlevin.co.uk/tq?key=0AumlInkr1Mq1dGpzV2RremZmQlJQOHZjOGw4enZzWEE&amp;transpose=0&amp;headers=1&amp;range=G4%3AI12&amp;gid=0&amp;pub=1","options":{"reverseCategories":false,"fontColor":"#fff","midColor":"#36c","pointSize":"0","headerColor":"#3d85c6","headerHeight":40,"is3D":false,"logScale":false,"wmode":"opaque","hAxis":{"maxAlternation":1},"title":"Company Size","isStacked":true,"mapType":"hybrid","showTip":true,"displayAnnotations":true,"nonGeoMapColors":["#3366CC","#ff9900","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"titleY":"Percent of People","dataMode":"markers","colors":["#3366CC","#ff9900","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"smoothLine":false,"maxColor":"#222","lineWidth":"2","labelPosition":"right","fontSize":"14px","hasLabelsColumn":true,"maxDepth":2,"legend":"bottom","allowCollapse":true,"minColor":"#ccc","reverseAxis":false,"width":600,"height":371},"refreshInterval":5} &lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
This is the results by company size (by people), however because I didn't have a lot of participants in some groups, I rounded the some number in the graph below.&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; {"chartType":"AreaChart","chartName":"Chart2","dataSourceUrl":"//spreadsheets0.google.com/a/jonathanlevin.co.uk/tq?key=0AumlInkr1Mq1dGpzV2RremZmQlJQOHZjOGw4enZzWEE&amp;transpose=0&amp;headers=1&amp;range=G17%3AI21&amp;gid=0&amp;pub=1","options":{"reverseCategories":false,"fontColor":"#fff","midColor":"#36c","pointSize":"0","headerColor":"#3d85c6","headerHeight":40,"is3D":false,"logScale":false,"hAxis":{"maxAlternation":1},"wmode":"opaque","title":"Company Size","mapType":"hybrid","isStacked":true,"showTip":true,"displayAnnotations":true,"nonGeoMapColors":["#3366CC","#ff9900","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"titleY":"","dataMode":"markers","colors":["#3366CC","#ff9900","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"smoothLine":false,"maxColor":"#222","lineWidth":"2","labelPosition":"right","fontSize":"14px","hasLabelsColumn":true,"maxDepth":2,"legend":"bottom","allowCollapse":true,"minColor":"#ccc","reverseAxis":false,"width":600,"height":371},"refreshInterval":5} &lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Again, the trend here is the 67% vs 32% stated in the pie chart and it seems more or less equal across the company sizes.&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; {"chartType":"AreaChart","chartName":"Chart3","dataSourceUrl":"//spreadsheets0.google.com/a/jonathanlevin.co.uk/tq?key=0AumlInkr1Mq1dGpzV2RremZmQlJQOHZjOGw4enZzWEE&amp;transpose=0&amp;headers=1&amp;range=G23%3AI31&amp;gid=0&amp;pub=1","options":{"reverseCategories":false,"fontColor":"#fff","midColor":"#36c","pointSize":"0","headerColor":"#3d85c6","headerHeight":40,"is3D":false,"logScale":false,"hAxis":{"maxAlternation":1},"wmode":"opaque","title":"Programming Languages","mapType":"hybrid","isStacked":true,"showTip":true,"displayAnnotations":true,"nonGeoMapColors":["#3366CC","#ff9900","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"dataMode":"markers","colors":["#3366CC","#ff9900","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"smoothLine":false,"maxColor":"#222","lineWidth":"2","labelPosition":"right","fontSize":"14px","hasLabelsColumn":true,"maxDepth":2,"legend":"bottom","allowCollapse":true,"minColor":"#ccc","reverseAxis":false,"width":600,"height":371},"refreshInterval":5} &lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Programming languages used had a slightly different trend. PHP not adopting NoSQL as much as other programming languages, but again I only had a certain number of participants to say for sure. &lt;br /&gt;
Below the number of languages used in the company.&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; {"chartType":"AreaChart","chartName":"Chart5","dataSourceUrl":"//spreadsheets0.google.com/a/jonathanlevin.co.uk/tq?key=0AumlInkr1Mq1dGpzV2RremZmQlJQOHZjOGw4enZzWEE&amp;transpose=0&amp;headers=1&amp;range=G33%3AI36&amp;gid=0&amp;pub=1","options":{"reverseCategories":false,"fontColor":"#fff","midColor":"#36c","pointSize":"0","headerColor":"#3d85c6","headerHeight":40,"is3D":false,"logScale":false,"hAxis":{"maxAlternation":1},"wmode":"opaque","title":"Number of Languages Used","mapType":"hybrid","isStacked":true,"showTip":true,"displayAnnotations":true,"nonGeoMapColors":["#3366CC","#ff9900","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"dataMode":"markers","colors":["#3366CC","#ff9900","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"smoothLine":false,"maxColor":"#222","lineWidth":"2","labelPosition":"right","fontSize":"14px","hasLabelsColumn":true,"maxDepth":2,"legend":"bottom","allowCollapse":true,"minColor":"#ccc","reverseAxis":false,"width":600,"height":371},"refreshInterval":5} &lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks again for those who participated in the survey!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-1330870262557799207?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/1330870262557799207/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=1330870262557799207" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/1330870262557799207?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/1330870262557799207?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2011/03/mysql-nosql-survey-results.html" title="MySQL &amp; NoSQL Survey - Results" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DE8CQn48fCp7ImA9Wx9RGEo.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-85973030691125812</id><published>2010-12-20T20:26:00.001Z</published><updated>2010-12-20T20:27:43.074Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-20T20:27:43.074Z</app:edited><title>Deduplicating Your Customer Data</title><content type="html">Here is my presentation from the UK Oracle User Group at the&amp;nbsp;beginning&amp;nbsp;of December.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe src="http://player.vimeo.com/video/17533592" width="640" height="360" frameborder="0"&gt;&lt;/iframe&gt;&lt;p&gt;&lt;a href="http://vimeo.com/17533592"&gt;Deduplicating Your Customer Data&lt;/a&gt; from &lt;a href="http://vimeo.com/user1829646"&gt;Jonathan Levin&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;
Sorry for the late publishing.&lt;br /&gt;
At the presentation I met some really great people: Ronald Bradford,&amp;nbsp;Giuseppe Maxia and Andrew Poole.&lt;br /&gt;
I really did enjoy myself and benefited from attending.&lt;br /&gt;
The staff that took care of the speakers there did an excellent job.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-85973030691125812?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/85973030691125812/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=85973030691125812" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/85973030691125812?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/85973030691125812?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/12/deduplicating-your-customer-data.html" title="Deduplicating Your Customer Data" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8FSXo4cSp7ImA9Wx9REUQ.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-4216820338236253675</id><published>2010-12-12T21:53:00.000Z</published><updated>2010-12-12T21:53:38.439Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-12T21:53:38.439Z</app:edited><title>Wikileaks - Swedish TV Report</title><content type="html">I have seen a report about wikileaks and I have to say that I was impressed.&lt;br /&gt;
&lt;br /&gt;
Having spent time in China myself and noticed&amp;nbsp;similar&amp;nbsp;behaviour of denying information by other countries like Iran, I decided to "contribute to the world by making sure that ideas, truth and knowledge go &amp;nbsp;through barriers and reach people faster and easier".&lt;br /&gt;
&lt;br /&gt;
I would like to share this report with you and ask you to watch it soon as it will go off line in a day or two.&lt;br /&gt;
&lt;br /&gt;
&lt;object height="258" width="416"&gt;&lt;param name="movie" value="http://svt.se/embededflash/2264028/play.swf"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="sameDomain"&gt;&lt;/param&gt;&lt;embed src="http://svt.se/embededflash/2264028/play.swf" type="application/x-shockwave-flash" wmode="transparent" allowfullscreen="true" allowScriptAccess="sameDomain" width="416" height="258"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-4216820338236253675?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/4216820338236253675/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=4216820338236253675" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/4216820338236253675?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/4216820338236253675?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/12/wikileaks-swedish-tv-report.html" title="Wikileaks - Swedish TV Report" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkMERHs-cCp7ImA9Wx9TFU4.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-5642285956209584631</id><published>2010-11-23T18:53:00.000Z</published><updated>2010-11-23T18:53:25.558Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-23T18:53:25.558Z</app:edited><title>My Presentation for UKOUG</title><content type="html">I've put up my slides for my presentation for the UKOUG in Birmingham.&lt;br /&gt;
&lt;br /&gt;
If its seems interesting, be sure to drop by.&lt;br /&gt;
&lt;br /&gt;
&lt;div id="__ss_5878469" style="width: 425px;"&gt;&lt;strong style="display: block; margin: 12px 0 4px;"&gt;&lt;a href="http://www.slideshare.net/JonathanL/cleanliness-is-next-to-godliness" title="Cleanliness is next to Godliness"&gt;Cleanliness is next to Godliness&lt;/a&gt;&lt;/strong&gt;&lt;object height="355" id="__sse5878469" width="425"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cleanlinessisnexttogodliness-copy-101123123624-phpapp01&amp;stripped_title=cleanliness-is-next-to-godliness&amp;userName=JonathanL" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed name="__sse5878469" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cleanlinessisnexttogodliness-copy-101123123624-phpapp01&amp;stripped_title=cleanliness-is-next-to-godliness&amp;userName=JonathanL" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;div style="padding: 5px 0 12px;"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/JonathanL"&gt;JonathanL&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-5642285956209584631?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/5642285956209584631/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=5642285956209584631" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/5642285956209584631?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/5642285956209584631?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/11/my-presentation-for-ukoug.html" title="My Presentation for UKOUG" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkYFQHs6eyp7ImA9Wx5bFE4.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-127708696660819070</id><published>2010-10-30T11:21:00.000+01:00</published><updated>2010-10-30T11:21:51.513+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-30T11:21:51.513+01:00</app:edited><title>Oracle UKOUG</title><content type="html">..I'll be speaking in it:&amp;nbsp;&lt;a href="http://techandebs.ukoug.org/default.asp?p=5434&amp;amp;dlgact=shwprs&amp;amp;prs_prsid=5690&amp;amp;day_dayid=47"&gt;http://techandebs.ukoug.org/default.asp?p=5434&amp;amp;dlgact=shwprs&amp;amp;prs_prsid=5690&amp;amp;day_dayid=47&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There are quite a few good speakers from the MySQL community there, I noticed.&lt;br /&gt;
I would very much like to say hi to them when I'm there.&lt;br /&gt;
Very much looking forward to it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-127708696660819070?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/127708696660819070/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=127708696660819070" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/127708696660819070?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/127708696660819070?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/10/oracle-ukoug.html" title="Oracle UKOUG" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEIFQXY_fyp7ImA9Wx5QF00.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-5280681709086898072</id><published>2010-09-05T17:01:00.000+01:00</published><updated>2010-09-05T17:01:50.847+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-05T17:01:50.847+01:00</app:edited><title>So the planet has less money. Now what?</title><content type="html">I've been reading a lot of "gloom and doom" predictions about the world economy recently. Everyone is under the impression that there will be a "double dip" recession, taxes are going to be sky high and benefits are going to almost completely go away. Banks are not giving out loans to small or new companies, mortgage lending is quite bad (at least when I looked recently and decided to give up) and people are thinking twice now about going to university to improve their chances of getting a higher paying job (find articles about "college bubble").&lt;br /&gt;
I don't even really need to link news stories to the sentences above, because there really are that many.&lt;br /&gt;
&lt;br /&gt;
So the planet seems to have less money, now. At the very least, the number of people controlling the wealth of the planet has shrunk considerably (I would actually have to find some articles to make that assumption, but anyway...).&lt;br /&gt;
&lt;br /&gt;
My point is, so what now? Having less money doesn't mean you have to be less happy or fulfilled in your life.&lt;br /&gt;
&lt;br /&gt;
I predict that people will change the way they look at happiness (once they come out of their personal depression) and that they will pursue the following areas more:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Experience over possessions (there is already a small trend for this)&lt;/li&gt;
&lt;li&gt;More family and community (connecting with people makes you happier and live longer)&lt;/li&gt;
&lt;li&gt;An increase in Spirituality (usually happens after long periods of pain or depression)&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
Overall, I see this as an exciting time to be human as we are going to discover a lot more about ourselves and others.&lt;br /&gt;
&lt;br /&gt;
To help us start our path to happiness, I have attached a small booklet from neweconomics.org that gives you 5 ways to be happier everyday.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;object style="height: 289px; width: 420px;"&gt;&lt;param name="movie" value="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf?mode=embed&amp;amp;viewMode=presentation&amp;amp;layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fcolor%2Flayout.xml&amp;amp;backgroundColor=FFFFFF&amp;amp;showFlipBtn=true&amp;amp;documentId=100816110450-a89cb71be3314d67adccbe7b3758760d&amp;amp;docName=five_ways_to_well-being&amp;amp;username=neweconomicsfoundation&amp;amp;loadingInfoText=Five%20Ways%20to%20Well-being&amp;amp;et=1283702429665&amp;amp;er=2" /&gt;&lt;param name="allowfullscreen" value="true"/&gt;&lt;param name="menu" value="false"/&gt;&lt;embed src="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf" type="application/x-shockwave-flash" allowfullscreen="true" menu="false" style="width:420px;height:289px" flashvars="mode=embed&amp;amp;viewMode=presentation&amp;amp;layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fcolor%2Flayout.xml&amp;amp;backgroundColor=FFFFFF&amp;amp;showFlipBtn=true&amp;amp;documentId=100816110450-a89cb71be3314d67adccbe7b3758760d&amp;amp;docName=five_ways_to_well-being&amp;amp;username=neweconomicsfoundation&amp;amp;loadingInfoText=Five%20Ways%20to%20Well-being&amp;amp;et=1283702429665&amp;amp;er=2" /&gt;&lt;/object&gt;&lt;br /&gt;
&lt;div style="text-align: left; width: 420px;"&gt;&lt;a href="http://issuu.com/neweconomicsfoundation/docs/five_ways_to_well-being?mode=embed&amp;amp;viewMode=presentation&amp;amp;layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fcolor%2Flayout.xml&amp;amp;backgroundColor=FFFFFF&amp;amp;showFlipBtn=true" target="_blank"&gt;Open publication&lt;/a&gt; - Free &lt;a href="http://issuu.com/" target="_blank"&gt;publishing&lt;/a&gt; - &lt;a href="http://issuu.com/search?q=well-being" target="_blank"&gt;More well-being&lt;/a&gt;&lt;/embed&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-5280681709086898072?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/5280681709086898072/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=5280681709086898072" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/5280681709086898072?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/5280681709086898072?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/09/so-planet-has-less-money-now-what.html" title="So the planet has less money. Now what?" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkQAR3w_eyp7ImA9Wx5QFkU.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-5589332011209250512</id><published>2010-09-05T11:59:00.000+01:00</published><updated>2010-09-05T11:59:06.243+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-05T11:59:06.243+01:00</app:edited><title>My Opinion on NoSQL DBs</title><content type="html">I'll let the following express my opinion about NoSQL&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://howfuckedismydatabase.com/nosql/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://howfuckedismydatabase.com/nosql/fault-tolerance.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
and..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;object height="390" width="480"&gt;&lt;param name="movie" value="http://www.xtranormal.com/site_media/players/jwplayer.swf"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;param name="flashvars"value="height=390&amp;width=480&amp;file=http://newvideos.xtranormal.com/web_final_lo/574b3910-afc9-11df-914b-003048d69c21_27_web_final_lo_web_finallo-flv.flv&amp;image=http://newvideos.xtranormal.com/web_final_lo/574b3910-afc9-11df-914b-003048d69c21_27_web_final_lo_poster.jpg&amp;link=http://www.xtranormal.com/watch/6995033&amp;searchbar=false&amp;autostart=false"/&gt;&lt;embed src="http://www.xtranormal.com/site_media/players/jwplayer.swf" width="480" height="390" allowscriptaccess="always" allowfullscreen="true" flashvars="height=390&amp;width=480&amp;file=http://newvideos.xtranormal.com/web_final_lo/574b3910-afc9-11df-914b-003048d69c21_27_web_final_lo_web_finallo-flv.flv&amp;image=http://newvideos.xtranormal.com/web_final_lo/574b3910-afc9-11df-914b-003048d69c21_27_web_final_lo_poster.jpg&amp;link=http://www.xtranormal.com/watch/6995033&amp;searchbar=false&amp;autostart=false"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;object height="390" width="480"&gt;&lt;param name="movie" value="http://www.xtranormal.com/site_media/players/embedded-xnl-stats.swf"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.xtranormal.com/site_media/players/embedded-xnl-stats.swf" width="1" height="1" allowscriptaccess="always"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-5589332011209250512?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/5589332011209250512/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=5589332011209250512" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/5589332011209250512?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/5589332011209250512?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/09/my-opinion-on-nosql-dbs.html" title="My Opinion on NoSQL DBs" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DUMGRnY9fSp7ImA9WhVRE08.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-9201771631212091364</id><published>2010-07-03T20:04:00.001+01:00</published><updated>2012-03-21T10:57:07.865Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-21T10:57:07.865Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="DBA" /><title>Where have all the MySQL DBAs gone?</title><content type="html">New Addition:&amp;nbsp;&lt;a href="http://www.jonathanlevin.co.uk/2012/03/why-you-need-part-time-remote-mysql.html" target="_blank"&gt;Why you need a Part-time Remote MySQL Expert&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I have a friend who works as a MySQL recruiter. He recently told me that he cannot find any more MySQL DBAs in the UK or in the neighbouring countries.&amp;nbsp;His words were "I've exhausted the market".&lt;br /&gt;
&lt;br /&gt;
I myself know that there is a shortage of MySQL DBAs and that a lot of&amp;nbsp;recruitment&amp;nbsp;agencies are looking for them. So I started to wonder how come the situation is the way it is?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Experience curve&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Usually what I see in companies, is that they start out with the developers taking care of the databases along side their usual coding duties. At some point, they complain to management that they need a professional DBA to handle the database. When the complaints get loud enough, management looks for a new DBA.&lt;br /&gt;
The problem is that the DBA they want needs to have 3-5 years experience as a MySQL DBA.&lt;br /&gt;
It seems to me that there is no "phasing into" being a MySQL DBA or at least, you are expected to know a lot to begin with.&lt;br /&gt;
&lt;br /&gt;
As my recruiter friend said, DBAs come from 2 streams: developer or sysadmin.&lt;br /&gt;
I, myself, came from the developer side. I started as a developer and got more and more interested in the database. At some point, I was the only person in the company that knew anything about databases, so I was the first one to turn to when there was a problem.&amp;nbsp;Next thing I knew, I was a DBA.&lt;br /&gt;
Since I come from a developer background, I have some understanding of the code and how it interacts with the database. I usually put an emphasis on queries and schema design over server settings.&lt;br /&gt;
DBAs from sysadmin background, start as a system or network administrator that are at some point assigned responsibility over the databases (with or without their&amp;nbsp;consent) .&lt;br /&gt;
Most jobs do actually prefer a DBA from a sysadmin background over one from a developer background.&lt;br /&gt;
&lt;br /&gt;
The problem with phasing into being a MySQL DBA position, is that you would need to have other&amp;nbsp;responsibilities&amp;nbsp;apart from looking after databases. Eventually, you can phase into a position that needs most of your time to do that.&lt;br /&gt;
Its just that the in between is such a large chasm to cross, that many people don't really try to (especially &amp;nbsp;developers).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Its not that interesting&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For some people being a DBA most of the time isn't that interesting. I have seen DBAs opening their own companies or trying to become managers. I, myself, do a lot of data projects in addition to looking after the databases.&lt;br /&gt;
Companies that try to find a DBA, because the other developers complained for one, will almost&amp;nbsp;definitely&amp;nbsp;not have a lot of work for a that DBA a few months after they come in.&lt;br /&gt;
&lt;br /&gt;
Unless you work for a huge company like facebook or a consultancy like pythian, you will not find enough work as a MySQL DBA to avoid you from being bored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Salary&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
There is also a problem with salaries. From my experience, most companies look at MySQL DBAs as PHP developers with a bit extra. And in most companies (but recently this has changed a bit), PHP developers get paid quit low. &lt;br /&gt;
(To be honest, when I say "most companies" I mean LAMP shops or LAMP e-commerce companies. Usually, if you are the type of company to adopt open source, you wont have enough money to pay people well. This is of course changing and my current company is one of those exceptions, but more often then not, its that way.)&lt;br /&gt;
So accordingly, MySQL DBAs get offered salaries similar to mid to high level PHP developers.&lt;br /&gt;
&lt;br /&gt;
This can be fine for some people, but when you look over at the MS SQL and Oracle side.. it leave a lot to be desired. And back to the point of "phasing into" being a DBA, the&amp;nbsp;proprietary&amp;nbsp;databases have all sorts of levels. From beginner at "not so bad salary" to expert at "extremely well paid salary" to consultant at "obscenely high salary". There are very few MySQL DBA consultancy jobs that I have seen (almost all of them in&amp;nbsp;London) and the pay is&amp;nbsp;literately&amp;nbsp;half of Oracle or MS SQL consultancy jobs.&lt;br /&gt;
&lt;br /&gt;
It would be nice to see more balanced salaries for DBAs across the different technologies and recruiters like my friend try to achieve that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What needs to be done&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
I think its a difficult situation, to be honest. Even if companies try to encourage more people to become MySQL DBAs, it will still take some years for anything to change. This adds to the problem, I believe, of companies accepting MySQL as their database of choice. They can find MS SQL and Oracle DBAs easy enough (they just have to pay a lot), but how can they justify MySQL when it takes (at least) 3-6 months to secure a MySQL DBA (if at all).&lt;br /&gt;
However, companies can try to&amp;nbsp;accommodate&amp;nbsp;DBAs by allowing for more mixed positions (either developer or sysadmins) as well as training.&lt;br /&gt;
&lt;br /&gt;
It will be interesting seeing this space in the market develop.&lt;br /&gt;
&lt;br /&gt;
Addition:&lt;br /&gt;
Another post that talks about this problem can be found here:&lt;br /&gt;
&lt;a href="http://www.iheavy.com/2011/12/19/mythical-mysql-dba/" style="background-color: white; color: #114170; font-family: arial, sans-serif; font-size: 13px;" target="_blank"&gt;http://www.iheavy.com/2011/12/&lt;wbr&gt;&lt;/wbr&gt;19/mythical-mysql-dba/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-9201771631212091364?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/9201771631212091364/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=9201771631212091364" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/9201771631212091364?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/9201771631212091364?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/07/where-have-all-mysql-dbas-gone.html" title="Where have all the MySQL DBAs gone?" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>9</thr:total></entry><entry gd:etag="W/&quot;CEQBRX8yeip7ImA9WxFUEEg.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-70894425795337587</id><published>2010-06-20T17:45:00.000+01:00</published><updated>2010-06-20T17:45:54.192+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-20T17:45:54.192+01:00</app:edited><title>1 Million QPS</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/__8lgzcJRF8U/TB5FkTL9ZgI/AAAAAAAAI74/-Q-EZ3Fly4U/s1600/1MQPS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="448" src="http://3.bp.blogspot.com/__8lgzcJRF8U/TB5FkTL9ZgI/AAAAAAAAI74/-Q-EZ3Fly4U/s640/1MQPS.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-70894425795337587?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/70894425795337587/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=70894425795337587" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/70894425795337587?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/70894425795337587?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/06/1-million-qps.html" title="1 Million QPS" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/__8lgzcJRF8U/TB5FkTL9ZgI/AAAAAAAAI74/-Q-EZ3Fly4U/s72-c/1MQPS.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEMFRX8-cCp7ImA9WxFXEk0.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-7952748039619015392</id><published>2010-05-18T11:44:00.003+01:00</published><updated>2010-05-18T18:06:54.158+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-18T18:06:54.158+01:00</app:edited><title>How to Safetly Restart Your MySQL Slave Server</title><content type="html">&lt;ul&gt;&lt;li&gt;Make sure that nothing can access it &lt;br /&gt;
(take it off the load balancer).&lt;/li&gt;
&lt;li&gt;in mysql client do: STOP SLAVE;&lt;/li&gt;
&lt;li&gt;in mysql client do: FLUSH TABLES; &lt;br /&gt;
(if it gets stuck here, then you might need to fix it. You can try UNLOCK TABLES.)&lt;/li&gt;
&lt;li&gt;in command line do: /etc/init.d/mysql stop &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
...do your what you need to do here...&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;in command line do: /etc/init.d/mysql start &lt;br /&gt;
(check for errors, sometimes in my.cnf)&lt;/li&gt;
&lt;li&gt;in mysql client do: START SLAVE; &lt;br /&gt;
(normally this would be done automatically when you restart mysql)&lt;/li&gt;
&lt;li&gt;in mysql client do: SHOW SLAVE STATUS\G &lt;br /&gt;
(check that replication is working properly)&lt;/li&gt;
&lt;li&gt;After you are satisfied, set up the slave server back on the load balancer&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-7952748039619015392?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/7952748039619015392/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=7952748039619015392" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/7952748039619015392?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/7952748039619015392?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/05/how-to-safetly-restart-your-mysql-slave.html" title="How to Safetly Restart Your MySQL Slave Server" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>5</thr:total></entry><entry gd:etag="W/&quot;DkQDR3c9eip7ImA9WxFSFk4.&quot;"><id>tag:blogger.com,1999:blog-375697951860081841.post-3025248967656164109</id><published>2010-04-19T00:46:00.000+01:00</published><updated>2010-04-19T00:46:16.962+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-19T00:46:16.962+01:00</app:edited><title>Yet Another Opinion on the State of MySQL</title><content type="html">I’ve been keeping my eye open and my ears to the ground with regards to the Oracle purchase of MySQL. I was waiting for the O’Reilly conference to get a better idea of what might happen to MySQL in the future.&lt;br /&gt;
&lt;br /&gt;
After watching the presentations from the conference I can conclude that from what I saw - people are still generally worried about MySQL.&lt;br /&gt;
Those people are divided into two camps. On the left side you have the people that say, Oracle has a lot of money and lets make the best out of a bad situation. On the right side, you have people saying that we should band around MySQL and continue adding to the community version.&lt;br /&gt;
&lt;br /&gt;
What I understood from Oracle is that they would like to continue supporting MySQL and they would like to move MySQL into their stack. Meaning that Oracle would like to be the main provider of backup, monitoring and support - the areas where you can make money around MySQL. You can think of it like targeting the medium to large companies that already use MySQL and getting them into Oracle contracts for taking care of MySQL. &lt;br /&gt;
What I don’t think Oracle will do (or at least succeed in doing) is try to move MySQL customers to use the main Oracle database. I think there is a case for those same companies to start using Oracle databases for business intelligence or reporting and if they are already in the Oracle/MySQL “stack” then it would be easy for Oracle to sell them additional features.&lt;br /&gt;
This might not necessarily be a bad thing, since it ensures that when a company grows, there will be someone to turn to when they need help.&lt;br /&gt;
&lt;br /&gt;
What this means to me is that Oracle will invest in that surrounding stack (backup, monitoring and support) where it can make money and perhaps invest just enough in MySQL to keep it relevant. &lt;br /&gt;
Perhaps this is a good strategy. Perhaps this was what Sun should have done. What you can’t deny is that Oracle has a proven track record of making money and they will stick to what they know.&lt;br /&gt;
&lt;br /&gt;
From my point of view, I would like to take a closer look at using MariaDB in production. Its features are becoming increasingly relevant and I am confident that the companies that contribute to it, both care (deeply in some cases) about it and want to see it improve.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/375697951860081841-3025248967656164109?l=www.jonathanlevin.co.uk' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.jonathanlevin.co.uk/feeds/3025248967656164109/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=375697951860081841&amp;postID=3025248967656164109" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/3025248967656164109?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/375697951860081841/posts/default/3025248967656164109?v=2" /><link rel="alternate" type="text/html" href="http://www.jonathanlevin.co.uk/2010/04/yet-another-opinion-on-state-of-mysql.html" title="Yet Another Opinion on the State of MySQL" /><author><name>Jonathan Levin</name><uri>https://profiles.google.com/109490193695947400246</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-L3ugJU-YhmQ/AAAAAAAAAAI/AAAAAAAAI-M/7SPNMvIcMsk/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry></feed>

