mirror of
https://github.com/pgpointcloud/pointcloud.git
synced 2025-12-08 20:36:04 +00:00
Allow specifying per-table column name
This commit is contained in:
parent
6fd8dc6b47
commit
fc409ca842
@ -5,14 +5,20 @@
|
||||
|
||||
use strict;
|
||||
|
||||
@ARGV || die "Usage: $0 <tabname> [<tabname> ...]\n";
|
||||
@ARGV || die "Usage: $0 <tabname>[:<colname>] ...\n";
|
||||
|
||||
foreach $a (@ARGV) {
|
||||
my $tn="${a}";
|
||||
my $col="p";
|
||||
if ( $tn =~ /(.*):(.*)/ ) {
|
||||
$col = $2;
|
||||
$tn = $1;
|
||||
}
|
||||
print "select count(*) from \"${tn}\";\n";
|
||||
print "select min(pc_numpoints(\"${col}\")) from \"${tn}\";\n";
|
||||
print "select pg_size_pretty(pg_total_relation_size('${tn}'));\n";
|
||||
# full decompression
|
||||
print "explain analyze select PC_FilterEquals(p,'z',PC_PatchMax(p,'z')) from \"${tn}\";\n";
|
||||
print "explain analyze select PC_FilterEquals(\"${col}\",'z',PC_PatchMax(\"${col}\",'z')) from \"${tn}\";\n";
|
||||
# header only
|
||||
print "explain analyze select PC_PatchAvg(p,'z') from \"${tn}\";\n";
|
||||
print "explain analyze select PC_PatchAvg(\"${col}\",'z') from \"${tn}\";\n";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user