On Dec 16, 2009, at 4:20 AM, Istvan Soos wrote: > Hi, > > I've read somewhere in the docs that h2 has a table lock on writes - > and while the write is locking, there is no concurrent read. Is it > true that the writes will lock the reading threads too? What is the > best way to achieve lock-less reading performance? I care less if the > writes do lock the tables from other writes... >
Take a look at LOCK_MODE. http://www.h2database.com/html/grammar.html?highlight=LOCK_MODE&search=lock_mode#set_lock_mode It sounds like you want dirty reads which is what you get with 'SET LOCK_MODE 0'. You can also set it in your connection URL: "jdbc:h2:mem:test;LOCK_MODE=0" cr -- 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.
