#!/usr/bin/perl use strict; use DBI; use Benchmark qw(:all); #unlink ('/tmp/sqlite_test.db'); my $dbh = DBI->connect("dbi:SQLite:dbname=/tmp/sqlite_test.db","",""); my $str = '#' x 4096; my $sql = "INSERT INTO test VALUES (\'$str\')"; my $t0 = new Benchmark; $dbh->do("CREATE TABLE test (field1 text);"); $dbh->do("BEGIN;"); for (my $i; $i < 10; $i++) { timethis( -15 , \&insert_record ); } $dbh->do("COMMIT;"); sub insert_record { $dbh->do($sql); return; }