mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Scripts to run queries and data.
This commit is contained in:
2
src/test/performance/sqls/connection
Normal file
2
src/test/performance/sqls/connection
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
`echo "" | time $FrontEnd`;
|
5
src/test/performance/sqls/crtsimple
Normal file
5
src/test/performance/sqls/crtsimple
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
if ( $TestDBMS =~ /^pgsql/ )
|
||||||
|
{
|
||||||
|
`echo "CREATE TABLE simple (justint int);" | time $FrontEnd`;
|
||||||
|
}
|
5
src/test/performance/sqls/crtsimpleidx
Normal file
5
src/test/performance/sqls/crtsimpleidx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
if ( $TestDBMS =~ /^pgsql/ )
|
||||||
|
{
|
||||||
|
`echo "CREATE INDEX simpleidx ON simple (justint);" | time $FrontEnd`;
|
||||||
|
}
|
||||||
|
|
5
src/test/performance/sqls/drpsimple
Normal file
5
src/test/performance/sqls/drpsimple
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
if ( $TestDBMS =~ /^pgsql/ )
|
||||||
|
{
|
||||||
|
`echo "DROP TABLE simple;" | time $FrontEnd`;
|
||||||
|
}
|
29
src/test/performance/sqls/inssimple
Normal file
29
src/test/performance/sqls/inssimple
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
#
|
||||||
|
# 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`;
|
||||||
|
|
8192
src/test/performance/sqls/inssimple.data
Normal file
8192
src/test/performance/sqls/inssimple.data
Normal file
File diff suppressed because it is too large
Load Diff
2
src/test/performance/sqls/orbsimple
Normal file
2
src/test/performance/sqls/orbsimple
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
`echo "SELECT * FROM simple ORDER BY justint;" | time $FrontEnd`;
|
14
src/test/performance/sqls/slcsimple
Normal file
14
src/test/performance/sqls/slcsimple
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
`> .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`;
|
8192
src/test/performance/sqls/slcsimple.data
Normal file
8192
src/test/performance/sqls/slcsimple.data
Normal file
File diff suppressed because it is too large
Load Diff
5
src/test/performance/sqls/vacuum
Normal file
5
src/test/performance/sqls/vacuum
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
if ( $TestDBMS =~ /^pgsql/ )
|
||||||
|
{
|
||||||
|
`time $FrontEnd -c 'vacuum'`;
|
||||||
|
}
|
Reference in New Issue
Block a user