I can't be sure, but it looks like it's zero-ing out the header of a
page, so I would assume that it's a little necessary.
you could try increasing the page size of your database, that might
speed up this operation.
On 2012-04-02 17:15, Steve McLeod wrote:
Hi Thomas,
When running TRUNCATE TABLE on a large table, it is time-consuming.
I've done some profiling of the H2 source, and found that a step in
PageStore.checkpoint() that consumes one-third of the time needed for
TRUNCATE TABLE. In my specific case it uses 69 seconds out of seconds
for the whole TRUNCATE execution.
This line is the one consuming the time:
file.readFully(test, 0, 16);
which is org.h2.store.PageStore.java: line 451 in the current SVN trunk.
It is part of a process of zeroing freed pages on disk. I'm wondering
if zeroing is an important part of the workings of the PageStore. Or
is it for security reasons? If so, is this step something I could
potentially make optional by introducing a "INSECURE_FREE" database
option?
I'm running on Mac OS X Lion, using an SSD drive.
Regards,
Steve McLeod
--
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/-/KpuvExBPO2sJ.
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 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.