NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
AutoCommit (Score:1)
Is there any other way it could behave with auto-commit on?
Re:AutoCommit (Score:2)
Yes. Autocommit describes the behavior the driver takes when an exit occurs without an explicit commit or rollback. Upon exit, the driver will commit if autocommit is true and rollback if autocommit is false. There's nothing in there that says it has to commit every SQL statement and indeed, if you'll try a simple experiment with DBD::Oracle, you'll see that with autocommit on it doesn't commit until you tell it to or exit.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re:AutoCommit (Score:2)
SQLite is more of the category: "Databases in which a transaction must be explicitly started"
It could have behaved more like Oracle, but I didn't know that was an option.
transactions? (Score:1)
IIRC, if you start a transaction, then SQL-Lite will commit once per transaction, with auto commit. Think I remember reading something like that ? So chunk your inserts round a transaction and it will only commit once? Most databases do it that way, I think.
For some purposes, it may be ok to just checkpoint (to a log file, for instance) once every n rows, instead of committing.If something breaks, you can inspect the log and reload too.