Hi,

By Default H2 only allows access for a single thread to the database at a time internally. It doesn't seem to create performance issues because usually the disk IO is the bottleneck. Don't get confused between concurrent transactions and multi-threaded access.

It only creates issues if you have long running queries (not transactions) because it will lock out other threads. The solution is to make sure no single query takes too long to run, so break them into smaller queries, or enable the multi-threaded access, which is not well tested apparently.

This is just from my understanding / experience.

Ryan


On 27/05/2010 6:15 PM, Rami Ojares wrote:
Hi,

What does muti-threading inside database engine mean?
Surely it can't mean that only then more than one connection is allowed concurrently.
That seems to be the meaning of EXCLUSIVE
So does it mean that more than one processes (jvms) can access the same database file concurrently? But that does not seem likely either because how could the engine ensure consistency of the database file then?

Well it seems to be somehow possible because that is what FILE_LOCK=SERIALIZED promises. "This locking mode allows to open multiple connections to the same database. The connections may be opened from multiple processes and from different computers. When writing to the database, access is automatically synchronized internally." Maybe the synchronization is done so that only one process has access to the file but for a short period only
so that it seems like concurrent access.
||
MVCC is said to conflict with MULTI_THREADED=TRUE but that does not explain what MULTI_THREADED means.

- rami
--
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.

--
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