Hi,

> what we would like is be able to snapshot only the incremental changes.

Well, it sounds like what you really want is a persisted database with a
very large cache. Did you try that?

> for the same amount of data, does loading from an equivalent csv file
faster than this way?

There is no definete answer, it depends on a lot of things. Why don't you
try it out and tell use which one is faster for your case?

Regards,
Thomas





On Fri, Aug 2, 2013 at 1:54 AM, Jamie Wang <[email protected]> wrote:

> I have an embedded h2 database in my server application. Our application
> generates large number of rows. For example, some tables will have 1 to 2
> million rows in a day. Our application tries to persist the data to disk
> periodically just in case if a server crash happens. So far we tried using
> the Script function to persist each table to disk and when the server
> restarts, the data is reloaded using the runscript function. My question is:
>
> What is the fastest way to load the data? for the same amount of data,
> does loading from an equivalent csv file faster than this way? The reason I
> am asking this is I saw in the documentation and it said it is similar to
> "bulk load".
>
> Also we found snapshot the entire table takes time, what we would like is
> be able to snapshot only the incremental changes. For this what we have
> done is we first snapshot the entire table to disk. As new data being put
> into the database, we also append this delta into the file. if when a
> server restarts, it will load this file again.
>
> When loading this data,  how is the insert statements are being executed?
> Does each insert stmt being treated as a transaction? If I wrap a number of
> insert stmts within a begin and commit block, would this help increase
> loading speed?  I also looked the script file generated by the script
> function. I saw many insert statements and each insert stmt has many data
> fields. But I can't tell how many records each insert stmt is actually
> inserting. Can someone please explain?  Thank you in advance for your time
> and assistance.****
>
> ** **
>
> Jamie ****
>
> --
> 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/groups/opt_out.
>
>
>

-- 
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/groups/opt_out.


Reply via email to