#!/usr/bin/tclsh
#
# Run this script using TCLSH to do a speed comparison between
# various versions of SQLite and PostgreSQL and MySQL
#
# Run a test
#
set cnt 1
# Initialize the environment
#
expr srand(1)
catch
set fd
puts $fd
close $fd
catch
catch
set fd
puts $fd
close $fd
exec ./sqlite240 s2k.db <2kinit.sql
exec ./sqlite-t1 st1.db <2kinit.sql
set fd
puts $fd
close $fd
exec ./sqlite240 sns.db <nosync-init.sql
set ones
set tens
set fd
puts $fd "BEGIN;"
puts $fd "CREATE TABLE t1(a INTEGER, b INTEGER, c VARCHAR(100));"
for
puts $fd "COMMIT;"
close $fd
runtest
set fd
puts $fd "DELETE FROM t1;"
close $fd
runtest
set fd
puts $fd "BEGIN;"
for
puts $fd "COMMIT;"
close $fd
runtest
set fd
puts $fd "DELETE FROM t1;"
close $fd
runtest
set fd
puts $fd "BEGIN;"
for
puts $fd "COMMIT;"
close $fd
runtest
set fd
puts $fd "DELETE FROM t1;"
close $fd
runtest
set fd
puts $fd "BEGIN;"
for
puts $fd "COMMIT;"
close $fd
runtest
set fd
puts $fd "DELETE FROM t1;"
close $fd
runtest
set fd
puts $fd "BEGIN;"
for
puts $fd "COMMIT;"
close $fd
runtest
set fd
puts $fd "DELETE FROM t1;"
close $fd
runtest
set fd
puts $fd
close $fd
runtest