Skip to content

Commit bb7ed85

Browse files
committed
Add missing indexes to generalized tables in shortbread_v1_gen theme
1 parent 098ca00 commit bb7ed85

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

themes/shortbread_v1_gen/topics/boundaries.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ INSERT INTO {schema}.boundaries_]] .. level .. [[_new
204204
SELECT * FROM simplified WHERE ST_Length(geom) > ]] .. c.minlength)
205205

206206
table.insert(sql, 'ANALYZE {schema}.boundaries_' .. level .. '_new')
207+
table.insert(sql, 'CREATE INDEX ON {schema}.boundaries_' .. level .. '_new USING GIST (geom)')
207208
table.insert(sql, 'DROP TABLE {schema}.boundaries_' .. level)
208209
table.insert(sql, 'ALTER TABLE {schema}.boundaries_' .. level .. '_new RENAME TO boundaries_' .. level)
209210
end
@@ -227,6 +228,7 @@ INSERT INTO {schema}.boundaries_new
227228
SELECT way_ids, relation_ids, admin_level, maritime, disputed, (ST_Dump(geom)).geom AS geom
228229
FROM multigeom ]],
229230
'ANALYZE {schema}.boundaries_new',
231+
'CREATE INDEX ON {schema}.boundaries_new USING GIST (geom)',
230232
'DROP TABLE {schema}.boundaries',
231233
'ALTER TABLE {schema}.boundaries_new RENAME TO boundaries'
232234
}

themes/shortbread_v1_gen/topics/streets.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ $$ LANGUAGE plpgsql]]),
479479
themepark.expand_template('SELECT osm2pgsql_shortbread_streets_med()'),
480480
themepark.expand_template('DROP FUNCTION osm2pgsql_shortbread_streets_med()'),
481481
themepark.expand_template('ANALYZE {schema}.streets_med_new'),
482+
themepark.expand_template('CREATE INDEX ON {schema}.streets_med_new USING GIST (geom)'),
482483
themepark.expand_template('DROP TABLE {schema}.streets_med'),
483484
themepark.expand_template('ALTER TABLE {schema}.streets_med_new RENAME TO streets_med'),
484485
}
@@ -500,6 +501,7 @@ simplified AS
500501
INSERT INTO {schema}.streets_low_new (way_id, kind, ref, rail, minzoom, geom)
501502
SELECT * FROM simplified WHERE geom IS NOT NULL]]),
502503
themepark.expand_template('ANALYZE {schema}.streets_low_new'),
504+
themepark.expand_template('CREATE INDEX ON {schema}.streets_low_new USING GIST (geom)'),
503505
themepark.expand_template('DROP TABLE {schema}.streets_low'),
504506
themepark.expand_template('ALTER TABLE {schema}.streets_low_new RENAME TO streets_low'),
505507
}

themes/shortbread_v1_gen/topics/water.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ INSERT INTO {schema}.water_lines_gen_new (]] .. name_list .. [[, kind, tunnel, b
281281
SELECT * FROM simplified WHERE geom IS NOT NULL
282282
]]),
283283
themepark.expand_template('ANALYZE {schema}.water_lines_gen_new'),
284+
themepark.expand_template('CREATE INDEX ON {schema}.water_lines_gen_new USING GIST (geom)'),
284285
themepark.expand_template('DROP TABLE {schema}.water_lines_gen'),
285286
themepark.expand_template('ALTER TABLE {schema}.water_lines_gen_new RENAME TO water_lines_gen'),
286287
themepark.expand_template('TRUNCATE {schema}.expire_water_lines'),

0 commit comments

Comments
 (0)