Commit 142d42f9 authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

Scripts to run queries and data.

parent dbde5cae
`echo "" | time $FrontEnd`;
if ( $TestDBMS =~ /^pgsql/ )
{
`echo "CREATE TABLE simple (justint int);" | time $FrontEnd`;
}
if ( $TestDBMS =~ /^pgsql/ )
{
`echo "CREATE INDEX simpleidx ON simple (justint);" | time $FrontEnd`;
}
if ( $TestDBMS =~ /^pgsql/ )
{
`echo "DROP TABLE simple;" | time $FrontEnd`;
}
#
# Transactions are unsupported by MySQL - so for insertion of
# 8192 rows, 1 INSERT per Xaction, we returned "Transactions unsupported"
#
if ( $TestDBMS =~ /^mysql/ && $XACTBLOCK eq '' )
{
print STDERR " No_Xact\n";
return;
}
`> .sqlf`; # clean file
#
# PgSQL specific: if all queries from inssimple.data must be executed in
# single xaction ($XACTBLOCK ne '') then add BEGIN/END arround queries
#
`echo "BEGIN;" >> .sqlf` if ( $TestDBMS =~ /^pgsql/ && $XACTBLOCK ne '' );
`cat sqls/inssimple.data >> .sqlf`;
# PgSQL (see above)
`echo "END;" >> .sqlf` if ( $TestDBMS =~ /^pgsql/ && $XACTBLOCK ne '' );
# Ok - run queries
`time $FrontEnd < .sqlf`;
This source diff could not be displayed because it is too large. You can view the blob instead.
`echo "SELECT * FROM simple ORDER BY justint;" | time $FrontEnd`;
`> .sqlf`;
# PgSQL specific to execute all queries in single xaction
`echo "BEGIN;" >> .sqlf` if ( $TestDBMS =~ /^pgsql/ && $XACTBLOCK ne '' );
`cat sqls/slcsimple.data >> .sqlf`;
`echo "END;" >> .sqlf` if ( $TestDBMS =~ /^pgsql/ && $XACTBLOCK ne '' );
# Run queries
`time $FrontEnd < .sqlf`;
This source diff could not be displayed because it is too large. You can view the blob instead.
if ( $TestDBMS =~ /^pgsql/ )
{
`time $FrontEnd -c 'vacuum'`;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment