Subject | Commit Frequency |
---|---|
Author | Steve Apiki |
Post date | 2003-10-31T20:55:27Z |
Hello,
I have an application that I am currently porting to embedded firebird. In
the application I sometimes need to "import" large files (that is, insert a
large number of records from files of a known format). If the import fails,
or is canceled, or is otherwise interrupted, I don't want to keep those
records that I've already imported; I want to reimport it starting from
scratch.
The earlier version of this application (not on firebird) used to commit
every 1000 records to keep from running out of RAM. But as far as the
application goes, I prefer to commit only once. What I'm wondering is, how
many records can I insert with a single commit, and what is the constraint?
I've done some testing and I have found that I can insert up to 300,000
records with a single commit. My application's memory usage (this is
embedded firebird) never goes past 23 MB or so, and appears to have topped
out at that point.
Is it safe to insert arbitrarily large number of records in a single
commit, assuming I don't mind losing them all if I don't commit?
Thanks,
--Steve Apiki
Stephen Apiki
Developer
Appropriate Solutions, Inc. (www.AppropriateSolutions.com)
apiki@...
(603) 673-3776
I have an application that I am currently porting to embedded firebird. In
the application I sometimes need to "import" large files (that is, insert a
large number of records from files of a known format). If the import fails,
or is canceled, or is otherwise interrupted, I don't want to keep those
records that I've already imported; I want to reimport it starting from
scratch.
The earlier version of this application (not on firebird) used to commit
every 1000 records to keep from running out of RAM. But as far as the
application goes, I prefer to commit only once. What I'm wondering is, how
many records can I insert with a single commit, and what is the constraint?
I've done some testing and I have found that I can insert up to 300,000
records with a single commit. My application's memory usage (this is
embedded firebird) never goes past 23 MB or so, and appears to have topped
out at that point.
Is it safe to insert arbitrarily large number of records in a single
commit, assuming I don't mind losing them all if I don't commit?
Thanks,
--Steve Apiki
Stephen Apiki
Developer
Appropriate Solutions, Inc. (www.AppropriateSolutions.com)
apiki@...
(603) 673-3776