DragonK wrote:
Well, using transactions would be a little difficult, because I have a
library which does something like logging to a database. Using
transaction
on a single insert would be useless in my opinion, and on the other
hand I
can't use transactions on the all inserts, since logging is a continuous
process, it doesn't end.
You can basically have a transaction open all the time. Begin a
transaction on startup. Insert your log entries as they happen. Execute
a commit and another begin after every 100 records, and commit when your
program ends. You can also get more sophisticated adding a timer that
will also do a commit and begin say one second after the last log entry
if you need to. You will get a speedup by nearly a factor of 100, and if
you have a power failure or OS crash you will only lose the uncommitted
records, not your entire database.
HTH
Dennis Cote
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------