> 'jdbc:h2:split:my_path;PAGE_SIZE=1024'
Why do you split the database, and why do you use a different page size?
> During that process the CPU usage is rather low
> (approx. 15%) and so is the I/O throughput (no more than a few
> hundreds kB/s; it jumps to more than 10 MB/s for a few seconds just
> before finish).
Could you run the profiling tool to find out what exactly is going on
at that time? See
http://h2database.com/html/performance.html#application_profiling -
Example:
Profiler profiler = new Profiler();
profiler.startCollecting();
// application code
conn.close();
System.out.println(profiler.getTop(10));
Regards,
Thomas
Thanks a lot! I understand the problem now.
When closing a connection, the database removes the temporary LOBs for
this connection. But there is no index on this column, which is a
serious performance problem if you have a lot of LOBs.
I will fix this problem for the next release. I think it's very easy
to fix (adding one line to create the index), but of course I will
also add test cases.
Regards,
Thomas
> Does the fix you propose ("adding one line to create the index") mean
> that I'll have to recreate/reimport all the data when there is a new
> H2 version?
No, the index is automatically added when using the new version at
least once. You could add it yourself actually (after adding a BLOB):
CREATE INDEX IF NOT EXISTS INFORMATION_SCHEMA.INDEX_LOB_TABLE ON
INFORMATION_SCHEMA.LOBS(TABLE);
P.S. please don't send emails to me directly. Please use the Google
Group instead.
Regards,
Thomas
By the way, when testing, you need to ensure the content of each BLOB
is different. Otherwise, only one BLOB will actually be stored, and
all others just reference that one. One way to generate random data is
using java.util.Random.
Regards,
Thomas