I discovered mysql2 jewel. It really works fine with ruby 1.9 and utf8 encoding (instead of mysql jewel).

However I have doubts. Does somebody make use of this jewel in production? How about the performance test? Could it be faster than mysql jewel? Could it be stable?

mysql2 is intended like a more contemporary alternative for that existing mysql jewel, that has been stale for some time now. I additionally heard the author is not supporting it any longer and rather suggests everybody use his pure-ruby version becasue it is suitable for more Ruby implementations (but is much reduced).

The very first problem using the mysql jewel could it be does not inflict type casting in C, it offers a superior back ruby strings that you simply then need to convert into proper ruby types. Doing that in pure-ruby is very slow, and produces objects around the heap that never required to existing to begin with. And as everyone knows, Ruby's GC is it's primary reason behind it's slowness. So it is best to cure it and do just as much in pure C as possible.

Second is it blocks the entire ruby VM while hooking up, delivering queries and awaiting reactions, as well as closing the bond. mysqlplus certainly aids in this problem, only for delivering queries so far as I understand.

mysql2 aims to resolve these complaints and keep the API very simple. Eric Wong (author of Unicorn) has led some awesome patches which make nearly everything non-obstructing and/or release the GVL in Ruby. The Mysql2::Result class implements Enumerable if you understand how to make use of an Array, you are aware how to make use of it.

I am only conscious of a couple of people utilizing it in production at this time but it's being examined at Twitter, WorkingPoint and UserVoice too.

I am also in talks with Yehuda about this being the suggested/default for Rails 3 if this ships. A number of its techniques and optimizations will also be likely to be introduced into DataObjects' do_mysql driver soon too.

The ActiveRecord driver ought to be pretty solid right now. Whatever you should have to do is possess the jewel installed, and alter your adapter title in database.yml to mysql2.

If you are thinking about utilizing it, try it out. I am quick to push fixes if you discover any issues )

mysql2 has become the default in rails 3

A little late - but I am using mysql2 in production on a few sites, and also have thought it was very stable since some difficulties with connections getting closed were resolved a couple of days ago.

If anybody really wants to make use of the mysql jewel rather than the mysql2 jewel in Rails 3.. for Home windows, I authored a brief article that describes how you can tweak the rails application generator.