Noop: tag sql MAT VIEWS with a special comment (#733)

Tag all SQL materialized views with a machine-readable comment
to indicate that this materialized view can be created without
data:

   /* DELAY_MATERIALIZED_VIEW_CREATION */

In the next version of tools this comment can be optionally
replaced with the "WITH NO DATA" parameter, thus allowing
a much faster execution of the SQL script. All materialized
viewes will be populated with data in parallel afterwards
using the `refresh-views` tools script.
This commit is contained in:
Yuri Astrakhan
2020-01-20 12:02:49 -05:00
committed by GitHub
parent 4e13a17e1a
commit 1d91b9ef6e
6 changed files with 21 additions and 21 deletions

View File

@@ -15,7 +15,7 @@ CREATE MATERIALIZED VIEW osm_water_point AS (
FROM osm_water_polygon AS wp
LEFT JOIN lake_centerline ll ON wp.osm_id = ll.osm_id
WHERE ll.osm_id IS NULL AND wp.name <> ''
);
) /* DELAY_MATERIALIZED_VIEW_CREATION */;
CREATE INDEX IF NOT EXISTS osm_water_point_geometry_idx ON osm_water_point USING gist (geometry);
-- Handle updates