How reliable is h2 database? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
开发者_StackOverflowClosed 3 years ago.
Improve this questionWhen I ask this question, I see that the current version of H2 database was released on 07-01-2011 (very recently). That is very good & healthy. Will this pace be kept? event if the pace of new releases are slow, will it be supported by opensource community for long term?
For cost reasons, I am currently considering using Postgresql for a high performance app and H2 database seems to have the right set of features (basically whatever I need). Am not just sure if it would be a right decision to use H2. Basically my decision should be based on the long term support be it subscription based or by community.
Will this pace be kept?
That's the plan.
will it be supported by opensource community for long term?
It's hard to predict the future, I guess that's why nobody replied to your question yet :-) I'm sure it will be supported, because enough people use it. H2 is used in many (open source and commercial) products. Quite many regularly reply to questions in the mailing list. H2 currently doesn't have many committers, one reason is that the users are generally happy with its features, and because the current development speed is fast enough and the code quality is good enough.
Subscription based support is currently not available, but that's planned for the future (it always was the plan to provide commercial support at some point). The reason it is not yet available is that H2 doesn't yet have enough market share to start a company.
How reliable is h2 database? [closed]
In 2010 we switched away from H2 to MySQL for our large[r] corporate database shards. The biggest reason was that the internal H2 engine is single threaded. When large, unoptimized queries are running across our databases with 100s of thousands or millions of rows, all other database operations would stop. See the H2 documentation for more info. The row locking of H2 seems relatively immature compared to MySQL or Postgres.
In addition, MySQL and Postgres also provide replication mechanisms instead of rolling your own. This also allows us to backup our database system "live" from the slave instead of blocking a H2 database while we dump it.
Lastly, although I've not run this performance test, I suspect that although H2 is lightening fast for small to mid sized databases, as you increase the database size and especially the number of concurrent queries, MySQL and Postgres will start to equal and then best its overall performance -- especially looking at query time distribution.
We continue to use H2 for boutique, in memory, and test databases very successfully. Thanks much to Thomas for it!
H2 is a terrific database engine. After we solved a problem not related to H2, we switched from PostgreSQL and MySQL (both still supported) to H2. H2 became our primary database choice.
Speed is the main reason, but there are others: the embedded mode is amazing and gives us the flexibility to install the software in a portable device, even share the database on the cloud, let's say via Dropbox!
We don't use many features, because we are "persistent dependent" through "Datanucleus" (no triggers, procedures, etc), but our app is complex enough to push the H2! And it delivers flawlessly.
The reason is H2 has still continued outperforming. 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.
Where H2 is suitable?
- Standalone applications
- Intranet/LAN applications
- Java only Deployments
- Embedded as well as Server Mode
Why is it better than SQLite?
- More data types than SQLite.
- Boolean datatype support. Which is not available in SQLite.
- SQLite performance went down in a specific case when number of rows increases above 50,000 for around 15 column table (more or less). We did not find that issue with H2. It kept performing as usual.
- Even if it appears like single file similar to SQLite, H2 is encrypted. It is multi-user, password-protected database. This feature is not available in SQLite.
- Packaging it with you application costs just ~2MB space.
- Has inbuilt database management console, that also in the same ~2MB.
- H2 can be used for Android application development.
Comparing with MySQL:
- Boolean datatype support. Which is not available in MySQL.
- As of now we see, H2 performs almost equal to MySQL. Sometimes even outperforms when executing update queries.
- Our customers are happy to see a software that performs so fast.
- The reason to use it over MySQL is, currently it can be used for free in commercial standalone applications also.
Check
Constraint support, which was not available in MySQL until recently.
Comparing with PostgreSQL:
- Absolutely it is faster than PostgreSQL when the work/deployment environment is as specified at the start of this answer.
- Update operations with H2 are so much faster than PostgreSQL
- If somebody tries to compare H2 with PostgreSQL thoroughly, please do not do it, rather compare PostgreSQL with Giant OracleDB. H2 can not be compared with / can not be replaced with PostgreSQL featurewise.
It is most easier to handle while providing technical support. It can be shared as easy as drag and drop.
精彩评论