in reply to Re^2: SQLite and CPU Usage
in thread SQLite and CPU Usage

Turn off AutoCommit and manually commit your inserted rows ever 100 rows or so. The code is Class::DBI-ish but should be easily adapted to whatever your needs are:

package ASE::DB; use strict; use base 'Class::DBI'; __PACKAGE__->set_db( Main => "dbi:SQLite:dbname=d:/data/ase.sqlite","" +,"", {RaiseError => 1, AutoCommit => 0} );

Of course, then you have to commit at least at the end of your program run, or whenever a work unit has been processed:

ASE::DB->db_Main->commit;

Replies are listed 'Best First'.
Re^4: SQLite and CPU Usage
by PerlingTheUK (Hermit) on Aug 02, 2004 at 11:03 UTC
    Thank you,
    I just added a BEGIN and COMMIT myself. Don't ask me Why I did not see these statements in the manual! Thank you for any help and sorry for asking such stupid questions.