Xaprb

Stay curious!

Archive for January, 2009

What is the scalable replacement for InnoDB?

with 14 comments

A while back a Sun engineer posted an article claiming that the best way to scale MySQL is to shard your database in many instances on a single server, each of which runs in threads that individually have low performance. The Sun way has always been to get high throughput with high latency. And that’s fine. Others have commented on the real-world applicability of this technique with MySQL, so I won’t.

But what I’m interested in is something the author says in the comments of his own blog post:

btw; we are working on a scalable replacement of InnoDB. Stay tuned….

What is it?

Surely it’s not Falcon. MySQL and Sun have said many times Falcon isn’t meant to be an InnoDB replacement.

The next question: how should we interpret the word “scalable” given the context? Clearly there’s a difference of opinion between MrBenchmark and others on what that word means. So what will the scaling characteristics of this InnoDB replacement really be?

The following is a joke, not meant to be taken seriously: Maybe it will be MyISAM with a fix to the key buffer scalability problems. Start with your database with 50 tables. Make 1 million databases, each with the same 50 tables, and you can scale up to 1 million rows by putting 1 row in each table. Ta-da! Row-level locking with MyISAM!

But seriously, what is it?

Written by Xaprb

January 13th, 2009 at 2:28 am

Posted in SQL

Tagged with , , , , ,

Restoring from a mysqldump into tables with triggers

with 2 comments

This is actually old news, but I never thought to file a bug report (until now) or say anything to anyone about it. If you use mysqldump to dump and restore a MySQL table that has INSERT triggers, you can get different data in your restored database than you had when you dumped. The problem? The tool dumps the triggers before the data, so they get added back to the table before the rows are inserted.

The fix for this is really trivial. Just move the triggers after the INSERTs. Someone should patch mysqldump, but I’ve been too lazy… and besides, you know what I say about me and C programming. Unsafe at any speed.

This isn’t a problem with mk-parallel-dump, by the way. It puts the triggers in separate files, and mk-parallel-restore adds them back after the data is restored.

Written by Xaprb

January 8th, 2009 at 8:25 am

Posted in Maatkit,SQL

Tagged with , , ,

A New Year’s reading suggestion for Free Software advocates

with one comment

It’s a new year, and Free Software is more ubiquitous and important than ever. At the same time, the work is far from over. Here’s something inspiring you can read to stimulate some deep thoughts about the nature of Free Software: an essay from 1958, “I, Pencil.”

I first read this essay at my father’s suggestion, long before I was involved with computers. He told me it was the best defense of free enterprise and free markets that he’d ever read.

Here’s a quote I think is particularly interesting to think about in the context of software:

The above is what I meant when writing, “If you can become aware of the miraculousness which I symbolize, you can help save the freedom mankind is so unhappily losing.” For, if one is aware that these know-hows will naturally, yes, automatically, arrange themselves into creative and productive patterns in response to human necessity and demand—that is, in the absence of governmental or any other coercive masterminding—then one will possess an absolutely essential ingredient for freedom: a faith in free people. Freedom is impossible without this faith.

Among all the ancestors the pencil lists, it would today be obliged to list an incredible diversity of Free Software programmers and the software they write, which controls everything from the ship navigation systems to the telephone switches to the fuel injection systems in the diesel engines. And even more interesting, any given piece of Free Software should list a simple pencil amongst its ancestors. I know I used a lot of pencils in my studies.

Happy New Year! Long live Free Software!

Written by Xaprb

January 1st, 2009 at 8:20 pm

Posted in Commentary

Tagged with ,