Hello,

I have a H2 database on a machine that is read by several java
processes. The file is open in SERIALIZED mode, mainly because it's
mainly read only (some update can be done manually from time to time
via org.h2.tools.Shell utility).

Everything works good, but I noticed some behavior I was not
expecting. Let's say two process A and B are accessing the same
database

1) A and B are started and open the database
2) A runs 'SELECT * FROM tableA', the query is very fast (a couple of
ms - tableA is empty)
4) B runs the query 'SELECT * FROM tableB' -> the .h2.db file is
modified
5) A runs the same query on tableA, the query takes around 700 ms.
6) If A runs the query again it's fast again

tableA and tableB are empty tables, and both processes use
Statement.executeQuery(). I understand that there is some
synchronization involved but I was not expecting any penalties (step
5) on read only request. Am I missing something? would it be better to
use the ";AUTO_SERVER=TRUE" ?

I don't have a test case, but it should be easy enough to provide one
if needed !

Best,
Sylvain.

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