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:
@@ -13,7 +13,7 @@ CREATE MATERIALIZED VIEW osm_poi_stop_centroid AS (
|
||||
uic_ref
|
||||
HAVING
|
||||
count(*) > 1
|
||||
);
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */;
|
||||
|
||||
DROP MATERIALIZED VIEW IF EXISTS osm_poi_stop_rank CASCADE;
|
||||
CREATE MATERIALIZED VIEW osm_poi_stop_rank AS (
|
||||
@@ -33,7 +33,7 @@ CREATE MATERIALIZED VIEW osm_poi_stop_rank AS (
|
||||
WHERE
|
||||
subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway')
|
||||
ORDER BY p.uic_ref, rk
|
||||
);
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */;
|
||||
|
||||
ALTER TABLE osm_poi_point ADD COLUMN IF NOT EXISTS agg_stop INTEGER DEFAULT NULL;
|
||||
SELECT update_osm_poi_point_agg();
|
||||
SELECT update_osm_poi_point_agg();
|
||||
|
||||
Reference in New Issue
Block a user