<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Open Query blog &#187; Uncategorized</title>
	<atom:link href="http://openquery.com/blog/category/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://openquery.com/blog</link>
	<description>About MySQL, Drizzle, MariaDB and more!</description>
	<lastBuildDate>Wed, 07 Dec 2011 04:00:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The Anti-SQL Coalition  &#8211; The Daily WTF</title>
		<link>http://openquery.com/blog/the-anti-sql-coalition-the-daily-wtf</link>
		<comments>http://openquery.com/blog/the-anti-sql-coalition-the-daily-wtf#comments</comments>
		<pubDate>Tue, 22 Nov 2011 02:49:53 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/the-anti-sql-coalition-the-daily-wtf</guid>
		<description><![CDATA[http://thedailywtf.com/Articles/The-AntiSQL-Coalition-.aspx &#8220;There is a small coalition of developers at the office who are vehemently anti-database,&#8221; writes Bob, &#8220;naturally, this faction also doesn&#8217;t value &#8216;experience&#8217; &#8212; mostly, because they have none. At least, not outside their university studies. They&#8217;ll often liken a database server to a file system, and suggest that it&#8217;s just a convenient way [...]]]></description>
			<content:encoded><![CDATA[<div class="wdqs wdqs_link wdqs-link-container">
	<p class="wdqs-link-to-source"><a target="_blank" href="http://thedailywtf.com/Articles/The-AntiSQL-Coalition-.aspx">http://thedailywtf.com/Articles/The-AntiSQL-Coalition-.aspx</a></p>
	<div class="wdqs-thumbnail-container">
			</div>
	<div class="wdqs-text-container">
		<p>&#8220;There is a small coalition of developers at the office who are vehemently anti-database,&#8221; writes Bob, &#8220;naturally, this faction also doesn&#8217;t value &#8216;experience&#8217; &#8212; mostly, because they have none. At least, not outside their university studies. They&#8217;ll often liken a database server to a file system, and suggest that it&#8217;s just a convenient way to store blobs of data &#8212; but everything else is inelegant bloat.&#8221;</p>
	</div>
	<div style="clear:both"></div>
</div>]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/the-anti-sql-coalition-the-daily-wtf/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Query looking for new colleagues!</title>
		<link>http://openquery.com/blog/open-query-colleagues</link>
		<comments>http://openquery.com/blog/open-query-colleagues#comments</comments>
		<pubDate>Thu, 15 Sep 2011 04:42:05 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1558</guid>
		<description><![CDATA[My colleagues and I are looking for extra talent &#8211; is that you? What we do:help clients prevent problems (rather than being the fire department), we work on a subscription basis although we also do some ad-hoc consulting, and training. Apart from MySQL/MariaDB query and DBA work, we do quite a bit of system administration. [...]]]></description>
			<content:encoded><![CDATA[My colleagues and I are looking for extra talent &#8211; is that you?

<strong>What we do:</strong>help clients prevent problems (rather than being the fire department), we work on a subscription basis although we also do some ad-hoc consulting, and training. Apart from MySQL/MariaDB query and DBA work, we do quite a bit of system administration. Mainly Red Hat and Debian based distros, and expect to see replication and the MySQL-MMM multi-master system. You&#8217;d work from home, whereever it might be, so you will need to be self-motivating (but we do keep in touch online).

<strong>What we&#8217;re not:</strong> a full-time employer. With us, you make a life rather than a living. Everybody is contracted part-time. You can make enough to live comfortably, but that has nothing to do with hours. If you&#8217;re stressed about not filling all hours in your week with work-work-work, we&#8217;re not the company for you&#8230; there&#8217;s more to life than work, and we feel that&#8217;s really important.

Haven&#8217;t scared you off yet? Groovy. Take a peek at our <a href="http://openquery.com/company/jobs">jobs</a> page for additional detail and contact info. Hope to hear from you!]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/open-query-colleagues/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Various Anniversaries</title>
		<link>http://openquery.com/blog/anniversaries</link>
		<comments>http://openquery.com/blog/anniversaries#comments</comments>
		<pubDate>Tue, 13 Sep 2011 02:33:27 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[anniversary]]></category>
		<category><![CDATA[bluehackers]]></category>
		<category><![CDATA[luv]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[pythian]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[upstarta]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1550</guid>
		<description><![CDATA[This week, ten years ago, I was in London for MySQL AB&#8216;s first &#8220;train the trainer&#8221; course, also meeting (for the first time) my first boss at MySQL Kaj. I&#8217;d been hired mid August as employee#25, also doing training but actually primarily as tech-writer for the MySQL documentation (taking over from Jeremy Cole, and essentially [...]]]></description>
			<content:encoded><![CDATA[This week, ten years ago, I was in London for <a href="http://en.wikipedia.org/wiki/MySQL_AB" target="_blank">MySQL AB</a>&#8216;s first &#8220;train the trainer&#8221; course, also meeting (for the first time) my first boss at MySQL <a href="http://en.wikipedia.org/wiki/Kaj_Arn%C3%B6" target="_blank">Kaj</a>. I&#8217;d been hired mid August as employee#25, also doing training but actually primarily as tech-writer for the MySQL documentation (taking over from <a href="http://jcole.us/blog/" target="_blank">Jeremy Cole</a>, and essentially I <em>was</em> the documentation team for quite some time <img src='http://openquery.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . So from this you can deduce that yes, I was hired without meeting either Kaj or anyone in-person! I don&#8217;t think we even had a phone call, only email. Oh the days <img src='http://openquery.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> 

The training week itself was of course disrupted quite a bit by the events in New York. We had Jeremy who had come on a UA flight from the US, and others from all over the place&#8230; it also taught some students a lesson about browsing the net while in a training course, it can end up very distracting.

The oddest event I remember about that particular trip happened upon departure from Heathrow: someone with a clipboard went round the long queues asking whether anybody was carrying <em>eyebrow tweezers</em>. No other items/questions, just that.

I stayed with MySQL for about 6 years, until with a brief break, I started my own company <a href="http://openquery.com/" target="_blank">Open Query</a> in 2007 (about half a year before the Sun acquisition). So this September marks the 4-year anniversary of that event already. I spotted an old business card earlier, reminding me that early on we did not just MySQL consulting and training, but also (OSS) business advice &#8211; that&#8217;s now essentially spun off to <a href="http://upstarta.biz/" target="_blank">Upstarta.</a>

The MySQL side of my business has changed quite significantly as well, going from the usual reactive consulting to proactive subscriptions, in part based on <a href="http://pythian.com/" target="_blank">Pythian</a>&#8216;s successful model. A key difference has been that we don&#8217;t do emergencies. This disruptive shift happened somewhat by luck, after a talk at <a href="http://luv.asn.au/" target="_blank">Linux Users of Victoria</a> in <a href="http://luv.asn.au/2009/04/07" target="_blank">April 2009</a>. <a href="https://bendechrai.com/" target="_blank">Ben Dechrai</a> made a <a href="http://lu-vic.blip.tv/file/2417317/" target="_blank">video recording</a> of this interactive &#8220;Relax! A Failure is not an Emergency&#8230;&#8221; try-out. It also mentioned the <a href="http://bluehackers.org/" target="_blank">BlueHackers</a> initiative/stickers.

While some people including competitors regard our &#8220;no emergencies&#8221; approach as nuts <img src='http://openquery.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> , it has worked out very well and apart from making customers happy it&#8217;s created the sane lifestyle I was looking for (so I could spend more time with my daughter), and enabled contracting others as well. We&#8217;re still growing organically, having adapted our internal tools and processes for the proactive service approach along the way &#8211; obviously, it&#8217;s now more about project management than handling incident tickets.

Like my time at MySQL AB, my journey since then has so far proven interesting, educational, and mostly enjoyable. Later in the year I aim to once again buy a house with a modest garden. And it&#8217;s the independence that&#8217;ll have made that -and my other explorations- possible. Who knows what lies ahead &#8211; most fun when you create your own future!]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/anniversaries/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wikileaks Cable Offers New Insights Into Oracle-Sun Deal &#124; PCWorld Business Center</title>
		<link>http://openquery.com/blog/wikileaks-cable-offers-new-insights-into-oracle-sun-deal-pcworld-business-center</link>
		<comments>http://openquery.com/blog/wikileaks-cable-offers-new-insights-into-oracle-sun-deal-pcworld-business-center#comments</comments>
		<pubDate>Wed, 31 Aug 2011 02:59:44 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[pcworld]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[wikileaks]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/wikileaks-cable-offers-new-insights-into-oracle-sun-deal-pcworld-business-center</guid>
		<description><![CDATA[WikiLeaks Cable Offers New Insights into Oracle-Sun Deal (PC World) Nothing too new or shocking in there, but the cable does offer some interesting insights.]]></description>
			<content:encoded><![CDATA[<div class="wdqs wdqs_link wdqs-link-container">
<p class="wdqs-link-to-source"><a title="WikiLeaks Cable Offers New Insights into Oracle-Sun Deal" href="http://www.pcworld.com/businesscenter/article/239132/wikileaks_cable_offers_new_insights_into_oraclesun_deal.html" target="_blank">WikiLeaks Cable Offers New Insights into Oracle-Sun Deal</a> (PC World)</p>

<div class="wdqs-thumbnail-container">Nothing too new or shocking in there, but the cable does offer some interesting insights.</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/wikileaks-cable-offers-new-insights-into-oracle-sun-deal-pcworld-business-center/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Stick Figure Guide to the Advanced Encryption Standard (AES)</title>
		<link>http://openquery.com/blog/a-stick-figure-guide-to-the-advanced-encryption-standard-aes</link>
		<comments>http://openquery.com/blog/a-stick-figure-guide-to-the-advanced-encryption-standard-aes#comments</comments>
		<pubDate>Wed, 24 Aug 2011 00:24:42 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[encryption]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/a-stick-figure-guide-to-the-advanced-encryption-standard-aes</guid>
		<description><![CDATA[http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html Jeff Moser on software development]]></description>
			<content:encoded><![CDATA[<div class="wdqs wdqs_link wdqs-link-container">
<p class="wdqs-link-to-source"><a href="http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html" target="_blank">http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html</a></p>

<div class="wdqs-thumbnail-container"><a href="http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html" target="_blank"><img src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SreS30GKZdI/AAAAAAAABiE/mSpYbOwJdYI/s576/aes_act_1_scene_01_intro_576.png" alt="" width="346" height="271" /></a></div>
<div class="wdqs-text-container">

Jeff Moser on software development

</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/a-stick-figure-guide-to-the-advanced-encryption-standard-aes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Query, new on Fifth Ave</title>
		<link>http://openquery.com/blog/open-query-fifth-ave</link>
		<comments>http://openquery.com/blog/open-query-fifth-ave#comments</comments>
		<pubDate>Fri, 01 Apr 2011 02:22:35 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1456</guid>
		<description><![CDATA[Some of you already know since you helped us move, we recently shifted Open Query&#8217;s main office to Fifth Avenue, next door to Elizabeth&#8217;s. The new place is comfortable, I really like it so far. Anna is also happy with her new admin space and cat Figaro has found an empty spot on a bookshelf [...]]]></description>
			<content:encoded><![CDATA[Some of you already know since you helped us move, we recently shifted Open Query&#8217;s main office to Fifth Avenue, next door to Elizabeth&#8217;s. The new place is comfortable, I really like it so far. Anna is also happy with her new admin space and cat Figaro has found an empty spot on a bookshelf to stretch out on!

The lease costs are a bit steep, as is common these days&#8230; chances are we&#8217;ll just buy our next place.

<hr />

<strong>Follow-Up</strong> yes this was an April 1st post. But, everything in the above post is the truth, it&#8217;s just phrased to be very open for a bit of mis-interpretation <img src='http://openquery.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> 

I find that the real world provides plenty of fun and unbelievable yet true tidbits, so why bother making up nonsense!]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/open-query-fifth-ave/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PayPal &amp; decisions on acceptable use</title>
		<link>http://openquery.com/blog/paypal-decisions-acceptable</link>
		<comments>http://openquery.com/blog/paypal-decisions-acceptable#comments</comments>
		<pubDate>Tue, 07 Dec 2010 07:25:29 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[wikileaks]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1424</guid>
		<description><![CDATA[As you may know Open Query uses PayPal for some of its financial transactions. I filed the following question with PayPal support. Note that with this question I regard it as completely immaterial whether one supports of Julien Assange or WikiLeaks actions or not. Naturally companies have the right to choose which clients to serve, [...]]]></description>
			<content:encoded><![CDATA[As you may know Open Query uses PayPal for some of its financial transactions. I filed the following question with PayPal support. Note that with this question I regard it as completely immaterial whether one supports of Julien Assange or WikiLeaks actions or not. Naturally companies have the right to choose which clients to serve, but in this case they did cite a specific clause as the reason for cancellation and I don&#8217;t see how it applies. Also, PayPal is close to an effective monopoly in its sphere of operation, and that too comes with consequences and responsibilities. Anyway, the letter is below &#8211; naturally I&#8217;ll also post PayPal&#8217;s response.

===

As a business client of PayPal, I would like to inquire what PayPal&#8217;s decision making process is regarding violation of its &#8220;Acceptable Use&#8221; Policy.

I refer specifically to the published (<a href="https://www.thepaypalblog.com/2010/12/paypal-statement-regarding-wikileaks/" target="_blank">https://www.thepaypalblog.com/2010/12/paypal-statement-regarding-wikileaks/</a>) permanent restriction of the WikiLeaks account, quoting &#8220;&#8230; payment service cannot be used for any activities that encourage, promote, facilitate or instruct others to engage in illegal activity.&#8221;

Considering that at this point in time no charges have been laid against WikiLeaks for any of its activities, in any country, and not even a subpoena has seen the light of day, what basis did PayPal use for this decision?
Surely if there is illegal activity, this is typically indicated by a criminal conviction or at least a subpoena related to a prosecution.

I find it extremely worrying, and would appreciate some more clarity as this may our continued use of your service. Naturally companies have the right to choose which clients to serve, but in this case PayPal did cite a specific clause as the reason for  cancellation and I don&#8217;t see how it applies.

Obviously, we would prefer to not conduct business through an organisation which may at any point cancel our service for essentially arbitrary reasons which may include political disagreement, lobbying by third parties, or other forms of pressure. It would be great to narrow down that list of possibilities, ideally to 0. The law exists for a reason, it protects us all. Companies can&#8217;t go about playing judge&amp;jury.

Awaiting your response,
Regards,
Arjen Lentz
Exec.Director, Open Query

===

<strong>PayPal&#8217;s initial response</strong>
<blockquote>﻿Thank you for contacting PayPal in regards to our acceptable use policy
and our decision made on the account for WikiLeaks.

For security reasons we cannot discuss any details of a PayPal account
with a third party. The status of a PayPal account can only be discussed
with the account holder to ensure that sensitive account information is
not disclosed. For more information regarding WikiLeaks donations, we
advise you to contact the organization called Wau Holland used to raise
funds for WikiLeaks.

To learn more about the Acceptable Use Policy, please refer to our Help
Centre and the Legal Agreements section on the PayPal website.</blockquote>
===

<strong>My reply</strong>

Thank you for your reply.
The documents you&#8217;re referring to explicitly do not answer my question, which is why I asked. I am inquiring about other publically available information, from you, and asking for clarification:

PayPal made a public statement about cancelling Wau Holland&#8217;s PayPal service, quoting a specific sentence from the acceptable use policy. It&#8217;s at https://www.thepaypalblog.com/2010/12/paypal-statement-regarding-wikileaks/
So, both the fact that an account was cancelled and some aspect of the reasoning was made public by you.

So all I am asking is clarification of your own this public statement, as it affects me as a PayPal client.
The sentence you refer to in the publication is “… payment service cannot be used for any activities that encourage, promote, facilitate or instruct others to engage in illegal activity.” and such matters are, by nature, a matter of public record also. Therefore, it should be no problem at all for you to simply tell me what illegal activity you are referring to.
Did they promote, facilitate or instruct? Which one is it? And which illegal activity?

As you&#8217;ll be aware, what is &#8220;illegal&#8221; is defined by law; if the law has been broken, charges can be filed &#8211; then of course there is a presumption of innocence, but if a case is proven and a conviction is made, then naturally action is taken. No charges have been filed against Wau Holland, thus PayPal appears to have no legal basis for its action &#8211; it amounts to arbitrary choice and not actually based on the stated Acceptable Use clause.

As I mentioned in my original question, of course a company has the right to choose its customers &#8211; that&#8217;s why it has terms, conditions, acceptable use policies, etc. It makes it clear to would-be-customers what can be expected.
If you put in a clause &#8220;we reserve the right to cancel any client&#8217;s service at any point at our discretion&#8221; then indeed you can do what you like, and clients know what to expect. It&#8217;s clear. However, that&#8217;s not what you did.

In this case your actions don&#8217;t appear to jive with your own published policies, and your initial response to me does not inspire any more. The issue in a way has nothing to do with WikiLeaks or Wau Holland and whether their actions are likable or not. But what it appears to mean for PayPal clients: if a malicious third party contacts PayPal or PayPal itself &#8220;feels like it&#8221;, my account may be suspended even if I did not break any stated PayPal policy.

As a person, and entrepreneur, this worries me greatly.
It becomes a matter of PayPal being predictable and trustworthy as a business partner.
I think that is quite worthy of a more constructive and comprehensive response from the side of PayPal.
thanks

Regards,
Arjen.

===

<strong>Their reply (9 Dec)
</strong>

﻿Thanks for contacting PayPal. I appreciate the opportunity to assist you with your questions.

<em>(yes that was the entire reply)</em>

===

<strong>My reply (9 Dec)
</strong>

﻿﻿yes? I too would appreciate that [assisting me with my questions], but you haven&#8217;t so far. The above text was the only bit in your email, not actually addressing my questions. Looking forward to your proper reply.
thanks

===

No further correspondence was received. On the same day though, this appeared in the press: <a href="http://thenextweb.com/media/2010/12/09/caving-to-pressure-from-supporters-paypal-releases-wikileaks-funds/" target="_blank">Caving to pressure from supporters, PayPal releases WikiLeaks’ funds</a>

Well, that&#8217;s something, But doesn&#8217;t actually address the questions I raised, which were of a generic business nature and not restricted to the WikiLeaks issue. The issue is that PayPal appears to be an unpredictable business partner, not adhering to its own terms of service when (for whatever reason) it sees fit. That is a serious problem.]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/paypal-decisions-acceptable/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cache pre-loading on mysqld startup</title>
		<link>http://openquery.com/blog/cache-preloading-mysqld-startup</link>
		<comments>http://openquery.com/blog/cache-preloading-mysqld-startup#comments</comments>
		<pubDate>Wed, 01 Dec 2010 06:08:58 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[failover]]></category>
		<category><![CDATA[init-file]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[preload]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[slave]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1414</guid>
		<description><![CDATA[The following quirky dynamic SQL will scan each index of each table so that they&#8217;re loaded into the key_buffer (MyISAM) or innodb_buffer_pool (InnoDB). If you also use the PBXT engine which does have a row cache but no clustered primary key, you could also incorporate some full table scans. To make mysqld execute this on [...]]]></description>
			<content:encoded><![CDATA[The following quirky dynamic SQL will scan each index of each table so that they&#8217;re loaded into the key_buffer (MyISAM) or innodb_buffer_pool (InnoDB). If you also use the PBXT engine which does have a row cache but no clustered primary key, you could also incorporate some full table scans.

To make mysqld execute this on startup, create /var/lib/mysql/initfile.sql and make it be owned by mysql:mysql
<pre>SET SESSION group_concat_max_len=100*1024*1024;
SELECT GROUP_CONCAT(CONCAT('SELECT COUNT(`',column_name,'`) FROM `',table_schema,'`.`',table_name,'` FORCE INDEX (`',index_name,'`)') SEPARATOR ' UNION ALL ') INTO @sql FROM information_schema.statistics WHERE table_schema NOT IN ('information_schema','mysql') AND seq_in_index = 1;
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET SESSION group_concat_max_len=@@group_concat_max_len;
</pre>
and in my.cnf add a line in the [mysqld] block
<pre>init-file = /var/lib/mysql/initfile.sql
</pre>
That&#8217;s all. mysql reads that file on startup and executes each line. Since we can do the whole select in a single (admittedly quirky) query and then use dynamic SQL to execute the result, we don&#8217;t need to create a stored procedure.

Of course this kind of simplistic &#8220;get everything&#8221; only really makes sense if the entire dataset+indexes fit in memory, otherwise you&#8217;ll want to be more selective. Still, you could use the above as a basis, perhaps using another table to provide a list of tables/indexes to be excluded &#8211; or if the schema is really stable, simply have a list of tables/indexes to be included instead of dynamically using information_schema.

Practical (albeit niche) application:

In a system with multiple slaves, adding in a new slave makes it   start  with cold caches, but since with loadbalancing it will pick up only  some of the load it often works out ok. However, some environments have dual  masters but the   application is not able to do read/write splits to  utilise slaves. In   that case all the reads also go to the active  master. Consequentially, the passive master will have relatively cold  caches (only rows/indexes that have been updated will be in memory) so in case of a failover the amount of disk reads for the many concurrent SELECT queries will go through the roof &#8211; temporarily slowing the effective performance to a dismal crawl: each query takes longer with the required additional disk access so  depending on the setup the server may even run out of connections which  in turn upsets the application servers. It&#8217;d sort itself out but a) it looks very bad on the frontend and b) it may take a number of minutes.

The above construct prevents that scenario, and as mentioned it can be used as a basis to deal with other situations. Not many people know about the init-file option, so this is a nice example.

If you want to know how the SQL works, read on. The original line is very long so I&#8217;ll reprint it below with some reformatting:
<pre>SELECT GROUP_CONCAT(CONCAT(
  'SELECT COUNT(`',column_name,'`)
          FROM `',table_schema,'`.`',table_name,
          '` FORCE INDEX (`',index_name,'`)'
       ) SEPARATOR ' UNION ALL ')
  INTO @sql
  FROM information_schema.statistics
  WHERE table_schema NOT IN ('information_schema','mysql')
  AND seq_in_index = 1;</pre>
The outer query grabs each regular db/table/index/firstcol name that exists in the server, writing out a SELECT query that counts all not-NULL values of the indexed column (so it must scan the index), forcing that specific index. We then abuse the versatile and flexible GROUP_CONCAT() function to glue all those SELECTs together, with &#8220;UNION ALL&#8221; inbetween. The result is a single very long string, so we need to tweak the maximum allowed group_concat output beforehand to prevent truncation.]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/cache-preloading-mysqld-startup/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle Blamed for Laws of Nature</title>
		<link>http://openquery.com/blog/oracle-blamed-facts-nature</link>
		<comments>http://openquery.com/blog/oracle-blamed-facts-nature#comments</comments>
		<pubDate>Fri, 05 Nov 2010 01:53:02 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[enterprise basic]]></category>
		<category><![CDATA[enterprise silver]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[upstarta]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1400</guid>
		<description><![CDATA[A catchy headline, and I believe more accurate than Oracle Puts the Squeeze on SMBs with MySQL Price Hike (Network World) and MySQL price hikes reveal depth of Oracle&#8217;s wallet love [MySQL Jacking up MySQL Prices] (The Register). Slightly more realistic is Oracle kills low-priced MySQL support (again The Register). First, let&#8217;s review what Oracle [...]]]></description>
			<content:encoded><![CDATA[A catchy headline, and I believe more accurate than <a href="http://www.networkworld.com/community/node/68219" target="_blank">Oracle Puts the Squeeze on SMBs with MySQL Price Hike</a> (Network World) and <a href="http://www.theregister.co.uk/2010/10/08/oracle_jacking_up_mysql_prices/" target="_blank">MySQL price hikes reveal depth of Oracle&#8217;s wallet love [MySQL Jacking up MySQL Prices]</a> (The Register). Slightly more realistic is <a href="http://www.theregister.co.uk/2010/11/03/oracle_mysql_price_hike/" target="_blank">Oracle kills low-priced MySQL support</a> (again The Register).

First, let&#8217;s review what Oracle has actually done: they ditched the MySQL enterprise Basic and Silver offerings. For Oracle, that makes sense. Their intended client base is &#8220;enterprise&#8221; (high end, think big corporates) and their MySQL sales and cost structure reflects this. It&#8217;s not a new thing that came with MySQL at Oracle, because MySQL at Sun Microsystems and MySQL AB before it had the same approach.

A company simply cannot operate  below its market &#8211; that is not simply a matter of choice, instead it is dictated by their processes and cost  structure. Smart people like Clayton Christensen at Harvard Business School have done ample research on this, here I&#8217;ll just give one simple example:

If you hire a sales person on commission and their quarterly quota is $100k, then they have to talk with clients that have at least a $10k-$20k potential (qualified leads), and they need to close (sign contract) with at least 10 within the period. They simply cannot spend any time on talking with potential $1k customers.

We may lament this state of affairs, but you can see how, given the choices made (sales person hired, commission system, quota), it&#8217;s as inevitable as an apple falling when you drop it. The way I describe this at <a href="http://upstarta.biz/Main/Principles" target="_blank">Upstarta</a>: if a company wants different results, they need to make sure that their business processes and cost structure lead them in that direction. But the simple fact is that most companies don&#8217;t have an internal feedback cycle that keeps an eye on these things, so they just go with the flow of consequences of common choices: aim for large(r) clients, grow turnover, get higher operational costs along the way &#8211; that in itself is a cycle and the only direction this particular one can go is up. As a natural consequence, over time old low-end offerings and clients need to be jettisoned &#8211; one way or another.

I say <em>horay for Oracle</em> to finally acknowledge this, since Sun Microsystems  and MySQL AB before it did not (for whatever reason). This is years overdue. Whether  the original MySQL company should have aimed to also serve smaller clients  also is an entirely separate topic &#8211; and one which I covered at length previously (including internally in my time at MySQL AB), but it&#8217;s very much a  station long  passed. Once you float upward in the market, you can&#8217;t operate or move  downward.

Now, are SMBs using MySQL actually getting squeezed by Oracle? They are not. There is no lock-in. This is about service contracts, not licensing. As we all know, MySQL is GPL licensed and internal use (even on a website or SaaS offering) is well within GPL parameters. There are a number of different companies offering service for MySQL, different types of service and delivery models and a corresponding wide range of pricing. So SMBs and anyone else has a choice, each can pick the type of service most suited to their needs. Let us celebrate and promote that freedom within the MySQL ecosystem, rather than being outraged about dropped apples falling!]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/oracle-blamed-facts-nature/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Replication and &#8220;the lost binlog&#8221;</title>
		<link>http://openquery.com/blog/replication-lost-binlog</link>
		<comments>http://openquery.com/blog/replication-lost-binlog#comments</comments>
		<pubDate>Fri, 03 Sep 2010 01:26:44 +0000</pubDate>
		<dc:creator>arjen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mysql mariadb replication maatkit recovery sync_binlog fsync]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1389</guid>
		<description><![CDATA[Unless you set sync_binlog = 1, a system crash on the master will likely fail any slave with an &#8220;Client requested master to start replication from impossible position&#8221; error. Generally, this kind of situation requires manual intervention. When we see this, we make sure things indeed failed &#8220;past the end&#8221; of a binlog (i.e. the [...]]]></description>
			<content:encoded><![CDATA[Unless you set sync_binlog = 1, a system crash on the master will likely fail any slave with an &#8220;Client requested master to start replication from impossible position&#8221; error. Generally, this kind of situation requires manual intervention. When we see this, we make sure things indeed failed &#8220;past the end&#8221; of a binlog (i.e. the bit that didn&#8217;t get to the physical platter before the crash), reposition the slave to the next binlog, and use the Maatkit tools to ensure the slave is properly synced.

sync_binlog=1 is a problem in itself, because it makes the server not just do one fsync per commit, but several and that&#8217;s serious overhead. sync_binlog is actually not a boolean but a &#8220;fsync binlog every N commits&#8221; where 0 meaning &#8220;never&#8221;. So you could set it to 10 (fsync every 10 commits) and thus reduce the loss a little bit while not doing too much harm to performance. But it&#8217;s not ideal and won&#8217;t always prevent the above error.]]></content:encoded>
			<wfw:commentRss>http://openquery.com/blog/replication-lost-binlog/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
