#!/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 ./sqlite248 s2k.db <2kinit.sql
exec ./sqlite2412 s2kb.db <2kinit.sql
set fd
puts $fd
close $fd
exec ./sqlite248 sns.db <nosync-init.sql
exec ./sqlite2412 snsb.db <nosync-init.sql
set ones
set tens
set fd
puts $fd "CREATE TABLE t1(a INTEGER, b INTEGER, c VARCHAR(100));"
for
close $fd
runtest
set fd
puts $fd "BEGIN;"
puts $fd "CREATE TABLE t2(a INTEGER, b INTEGER, c VARCHAR(100));"
for
puts $fd "COMMIT;"
close $fd
runtest
set fd
for
close $fd
runtest
set fd
for
close $fd
runtest
set fd
puts $fd
puts $fd
close $fd
runtest
set fd
for
close $fd
runtest
set fd
puts $fd "BEGIN;"
for
puts $fd "COMMIT;"
close $fd
runtest
set fd
puts $fd "BEGIN;"
for
puts $fd "COMMIT;"
close $fd
runtest
set fd
puts $fd "BEGIN;"
for
puts $fd "COMMIT;"
close $fd
runtest
set fd
puts $fd "BEGIN;"
puts $fd "INSERT INTO t1 SELECT * FROM t2;"
puts $fd "INSERT INTO t2 SELECT * FROM t1;"
puts $fd "COMMIT;"
close $fd
runtest
set fd
puts $fd
close $fd
runtest
set fd
puts $fd
close $fd
runtest
set fd
puts $fd
close $fd
runtest
set fd
puts $fd
puts $fd
for
puts $fd
close $fd
runtest
set fd
puts $fd
puts $fd
close $fd
runtest