Ensure index exists for uprn link

This commit is contained in:
Tom Russell 2018-10-04 21:13:25 +01:00
parent a10e4bf5c6
commit 4415b21af5

View File

@ -23,6 +23,10 @@ cat {} '|' psql -c "\"COPY building_properties ( uprn_geom, toid, uprn, parent_u
# #
# Create references # Create references
# #
# index essential for speeed here
psql -c "CREATE INDEX IF NOT EXISTS building_toid_idx ON buildings ( ref_toid );"
# link to buildings
psql -c "UPDATE building_properties psql -c "UPDATE building_properties
SET building_id = ( SET building_id = (
SELECT b.building_id SELECT b.building_id