#! /bin/bash function do_test() { echo $1 for i in $(seq 1 12); do psql postgres -c "set log_min_duration_statement = 0; set client_min_messages=log; select sum(a) from $1"; done | grep LOG } function warmup() { for i in $(seq 1 5); do psql postgres -c "set log_min_duration_statement = -1; select sum(a) from $1"; done 1>&2 > /dev/null } for i in "t0" "pl"; do do_test $i done #exit warmup "pf0" for i in "pf0" "pf1"; do do_test $i done