I was able to speed the execution of queries by adding indexes. 
Also, I added MULTI_THREADED=TRUE to the database URL. However, I am still 
observing that whenever SELECT queries take sometime for execution, the 
insert/update operation on the table stalls. Was wondering whether the  
implementation of H2 database is single-threaded behind the scene.

On Monday, 16 July 2012 02:43:13 UTC-4, Thomas Mueller wrote:
>
> Hi,
>
> The best solution would be to speed up the queries of course. If you can't 
> do that:
>
> By default, H2 does not execute multiple statements concurrently. You 
> would have to enable multi-threading by appending ";MULTI_THREADED=TRUE" to 
> the database URL (see the docs).
>
> Regards,
> Thomas
>
>
> On Tuesday, July 10, 2012, abhi wrote:
>
>> We are using H2 in-memory database for a application, which has 500+ 
>> insert/updates per second operation on a single table. The application is 
>> expected to eventually handle 2000+ insert/update per second.  
>>
>> It is observed that SELECT queries, which takes long time (say 2+ 
>> seconds) to execute, stall insert/update operations until they have not 
>> completed execution.
>>
>> We do not want  SELECT queries to block insert/update operations on the 
>> table. To achieve concurrency, I tried different configurations such as 
>> LOCK_MODE=3 or MVCC=TRUE. However, they do not fix the issue. 
>>
>> I would like to know if there is a way to run concurrent select and 
>> insert/update operation on the table?
>>
>> We are using 1.3.xxx version of the H2 database.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "H2 Database" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/h2-database/-/7BtvkpJOpQ8J.
>> 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 view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/jdN91tUnxmYJ.
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