File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 (ST_MaximumInscribedCircle(geometry)).center AS geometry,
3737 name,
3838 NULLIF(as_numeric(height), - 1 ) AS height,
39- ST_Area(geometry) AS area,
39+ ROUND( ST_Area(geometry):: numeric , 2 ) AS area,
4040 type,
4141 start_date,
4242 end_date,
@@ -65,4 +65,6 @@ $$ LANGUAGE plpgsql;
6565
6666SELECT create_buildings_materialized_view(1500 , ' mview_buildings_points_centroids_z14' );
6767SELECT create_buildings_materialized_view(1000 , ' mview_buildings_points_centroids_z15' );
68- SELECT create_buildings_materialized_view(0 , ' mview_buildings_points_centroids_z16_20' );
68+ SELECT create_buildings_materialized_view(500 , ' mview_buildings_points_centroids_z16' );
69+ SELECT create_buildings_materialized_view(250 , ' mview_buildings_points_centroids_z17' );
70+ SELECT create_buildings_materialized_view(0 , ' mview_buildings_points_centroids_z18_20' );
Original file line number Diff line number Diff line change @@ -89,9 +89,12 @@ other_areas_views=(
8989mview_buildings_points_centroids_views=(
9090 " mview_buildings_points_centroids_z14"
9191 " mview_buildings_points_centroids_z15"
92- " mview_buildings_points_centroids_z16_20"
92+ " mview_buildings_points_centroids_z16"
93+ " mview_buildings_points_centroids_z17"
94+ " mview_buildings_points_centroids_z18_20"
9395)
9496
97+
9598# Start refreshing in parallel with a sleep interval all of them in average of 4 min refresh
9699# # Benchmark admin refresh those views takes 4 min to complete
97100refresh_mviews_group " admin" 1 " ${admin_views[@]} " &
@@ -103,5 +106,5 @@ refresh_mviews_group "water" 160 "${water_views[@]}" &
103106refresh_mviews_group " landuse" 220 " ${landuse_views[@]} " &
104107# # Benchmark other areas and centroids refresh those views takes 3 secs to complete
105108refresh_mviews_group " other_areas" 230 " ${other_areas_views[@]} " &
106- # # Benchmark: Refreshing building points/centroids takes 31 seconds to complete.
109+ # # Benchmark: Refreshing building points/centroids takes 60 seconds to complete.
107110refresh_mviews_group " buildings_points_centroids" 230 " ${mview_buildings_points_centroids_views[@]} " &
Original file line number Diff line number Diff line change @@ -245,6 +245,7 @@ function importData() {
245245 psql $PG_CONNECTION -f queries/mviews_landuse_areas_centroids.sql
246246 psql $PG_CONNECTION -f queries/mviews_other_areas.sql
247247 psql $PG_CONNECTION -f queries/mviews_other_areas_centroids.sql
248+ psql $PG_CONNECTION -f queries/mviews_buildings_points_centroids.sql
248249 # Create INIT_FILE to prevent re-importing
249250 touch $INIT_FILE
250251}
You can’t perform that action at this time.
0 commit comments