Hi,

El 07/12/10 10:12, Nagin escribió:
> It is web application, where we use jboss application server, so we
> have multiple concurrent connection to DB (15-25 connection ). Can H2 support 
> high concurrency upto 25 connection?

In a webapp you can use H2 embedded with a connection pooling DataSource. I get 
best result with MULTI_THREADED enabled than with MVCC, but that is very 
dependent of your workload's Read/Write ratio.
In my experience with a ~ 80/20 R/W ratio , this scenario with some caching 
assistance for most used queries, support 40 simultaneous real web users 
without major problems.
Of course, response time will increase as read concurrency increases, but in my 
case within acceptable limits.

If most of your concurrency is on write statements, (on H2 and in any RDMS) 
your application must be prepared to properly handle time-outs and dead-Locks 
conditions.
I mean to do transaction rollback and re-try in a random near time - say 
random(2000) millis -  to reduce dead-locks probability and ensures that sooner 
or later your transaction be performed.
In this case is better to use  MVCC and a small TIMEOUT  (say 1 or 2 secs) to 
make transactions fail fast. This helps to not worsen a temporal situation of 
congestion, and avoid dead-locks that can impact the overall DBMS performance.
All this numbers must be adjusted to your application an typical workload with 
a thoughtfully testing.

> 2.Our queries are quite complex and contains inner joins
If that queries are not a problem in MySql, I dare say that neither will be in 
H2.

> 3.Have around 150 tables.
What's matter is how many of this tables will concentrate the concurrency. If 
concurrency is well distributed, many tables is good, almost for update 
transactions.

H2 is fast enough to perform better than others DBMS in many cases, 
particularly if workload consists mostly of small transactions and short run 
queries.
For long running queries and high write concurrency, you may need to use some 
helper resorts like caching and some mechanism to handle or reduce collisions 
impact as outlined above.

Anyway, the last word come from your own try ;-)

regards,
Dario

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to