Project

General

Profile

« Previous | Next » 

Revision 8111

inputs/FIA/*/postprocess.sql: Cluster tables by their *.unique index for faster joins

View differences:

postprocess.sql
22 22

  
23 23
-- ("STATECD", "UNITCD", "COUNTYCD", "PLOT", "INVYR", "CONDID", "SUBP", "TREE", "STATUSCD") is not unique
24 24
SELECT functions.create_if_not_exists($$ALTER TABLE "TREE" ADD CONSTRAINT "TREE.unique" UNIQUE ("TREE.CN")$$);
25
SELECT functions.cluster_once(:table_str, '"TREE.unique"');
25 26

  
26 27
SELECT functions.create_if_not_exists($$CREATE INDEX "TREE.parent" ON "TREE" (".STATECD", ".UNITCD", ".COUNTYCD", ".PLOT", ".INVYR", ".CONDID", ".SUBP")$$);

Also available in: Unified diff