H2 is not multi-threaded in this version. So a single long running statement will block everything else. You'll either need to split it up into smaller inserts (can still be a single transaction, just smaller queries), or you could try turning on MULTI_THREADED=1.

There is multi-threaded mode, but in this version it doesn't work with MVCC. I think in the latest beta version it might work, but if you are after reliability I'd go with breaking up your long running statement into smaller statements.

On 28/05/2014 1:45 AM, Brian Craft wrote:
Version 1.3.171. The only option I'm setting is MVCC, like "somefile;MVCC=TRUE". I'll try to get a thread dump in a few minutes.

Does this mean readers should not be blocked during the insert?

On Tuesday, May 27, 2014 4:18:01 AM UTC-7, Noel Grandin wrote:

    Can you post a thread dump, so we can see where it is blocked?
    Also which version is this, and what does your DB URL look like?

    On 2014-05-25 20:24, Brian Craft wrote:
    > I'm doing a large "insert into .. select * from CSVREAD ...",
    which is in a transaction. It seems to be blocking
    > readers, regardless of whether MVCC is enabled. Is this
    expected? If I understand the threads on MVCC, it will allow

--
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] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

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