I did a little performance test to find out which database to use in a JRuby desktop application. To have a comparison value I also ran the test (insert, find+update, destroy each 500 times) with MRI and the native sqlite3 driver. It revealed that the jdbcsqlite3 adapter is really sloooooooooow:
$ ruby test.rb sqlite3
user system total real
insert 0.4500 0.0900 0.5400 ( 7.303116)
find and update 0.4900 0.1400 0.6300 ( 6.984390)
destroy 0.3300 0.1100 0.4400 ( 7.261199)
$ jruby test.rb jdbcsqlite3
user system total real
insert 17.2500 0.0000 17.2500 ( 17.250000)
find and update 16.3270 0.0000 16.3270 ( 16.327000)
destroy 15.0900 0.0000 15.0900 ( 15.089000)
$ jruby test.rb h2
user system total real
insert 1.9320 0.0000 1.9320 ( 1.932000)
find and update 0.7800 0.0000 0.7800 ( 0.780000)
destroy 0.3180 0.0000 0.3180 ( 0.318000)
That’s what I call an easy decision. My setup can be downloaded here.