Because of the lack of Unicode support on the embedded SQLite database in Android
I am mostly interested in performance and stability of H2 Database vs Android SQLite
Are you guys using it? Should I be aware of any H2 database shortcomings?
SQLite is much more robust to corruption. Speed wise H2 was much faster in my case. With SQLite transactions are particularly costly, so you should prefer doing bulk operations within transactions or via batches.
Android SQLite is a very lightweight database which comes with Android OS. Android SQLite combines a clean SQL interface with a very small memory footprint and decent speed. For Android, SQLite is “baked into” the Android runtime, so every Android application can create its own SQLite databases.
With Actian Zen, developers and product managers get all the advantages of SQLite but in a powerful, secure, and scalable engine that can run serverless or as a client-server. Actian Zen is orders of magnitude faster than SQLite.
As of 2019, H2 is a superb database. We use it in all of our standalone applications since 4 years and we see it minimizes a gap between SQLite and MySQL. It performs as fast as or faster than MySQL.
Things are much better than I have expected. I now have an Android phone (HTC Desire, Android 2.2) and I made a first test.
Opening and closing a database is relatively slow so far (opening an existing database for the second time takes 0.2 seconds, closing about 0.2 seconds), but otherwise it looks like H2 performs quite well on Android, even if the Dalvik VM is not yet as optimized as a desktop JVM. It's too early to give concrete numbers, but Android is now a supported platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With