Hello all,

I just noticed that H2 1.4.191 is *much* slower when we bulk-insert
lots of data than 1.3.176. Bulk-inserting a 75 MB .sql file that used
to take about 30s or so, now takes about 15 minutes.

Context

* We use simple INSERT statements that don’t use placeholders (we just
manually execute all statements in a file that we created using H2’s
Script utility).
* We do have a few indexes on those tables, but nothing crazy. We
don’t drop the indexes before bulk-inserting (because it used to be
fast enough), but maybe that would help.
* There are a few rather wide varchar columns in those tables, but
again nothing crazy.
* The number of columns in those tables is not too extreme either: The
table with most columns maybe has 30, most of which are smallint,
bigint, date, small varchar, etc.

Profiling

* I attached a screenshot of a sampling profiler run (made with
JVisualVM) while the inserts were taking place, just in case someone
can derive from that what the problem could be.
* The timings at the right are ms, but the dot is not a decimal point
(so the total profiled time is 129 seconds, not milliseconds).
* There seems to be a difference in BaseIndex.compareRows between
those versions: 1.4.191 calls SearchRow.getValue a bit earlier in the
code path (and therefore maybe more times?) although the profiler
doesn’t show it (I assume because it gets inlined). I don’t know for
sure whether BaseIndex.compareRows gets called many more times, or
whether each call just takes more time in the new version.
* There are no differences between those versions in the methods from
RegularTable.addRow to TreeCursor.next.

Any ideas whether this is expected, a performance bug, or something else?

Nicolas

-- 
A. Because it breaks the logical sequence of discussion.
Q. Why is top posting bad?

-- 
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to