My understanding is that H2 is single-threaded, unless you use 
MULTI_THREADED or possibly MVCC. The second query needs to wait until the 
first completes.

This is explained in the docs 
here: http://www.h2database.com/html/features.html#multiple_connections




On Saturday, 28 November 2015 06:44:50 UTC+1, Pierre N wrote:
>
> I have a long running query "delete from mytable" which last ~30 seconds 
> (deleting ~400 000 records).
>
> While this query is running, the database is totally locked, I can't 
> execute another query. 
>
> Well I can execute the query, but it will be executed only after the 
> "delete" query is done. Even if it is a simple query like "select 1" or 
> "select 1 from dual"
>
> However if I start a long running query like "select 
> hash('sha256','aaaa',20000000);" I can execute in parallel "select 1" and 
> it will return immediatly.
>
> Why the "delete" statement is locking everything ?
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to