(unnamed)

text/plain

Filename: (unnamed)
Type: text/plain
Part: 0
Message: Re: multivariate statistics / patch v6
#! /usr/bin/perl

$DBNAME="postgres";
$scale = 1000;

if ($#ARGV >= 0) {
	$scale = $ARGV[0];
}

print "create table t1 (a int, b int);\n";
print "create table t2 (a int, b int);\n";
print "insert into t1 values ";
$delim = "";
for $a (1..$scale) {
	for $x (1, 2500, 5000, 7500) {
		$b = $a + $x;
		print "\n";
		for $i (1..8) {
			print $delim;
			$delim = ", ";
			print "($a, $b)";
		}
	}
}
print ";\n";
print "insert into t2 values ";
$delim = "";
for $a (1..$scale) {
	print "\n";
	for $x (1, 2500, 5000, 7500) {
		$b = $a + $x;
		print $delim;
		$delim = ", ";
		print "($a, $b)";
	}
}
print ";\n";
print "analyze t1;\n";
print "analyze t2;\n";