You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many transforms need additional indexes to be used. Currently this is commonly done as a .sql file distributed alongside the transforms, but this is not ideal for a few reasons
It is an extra process that might be forgotten
The create index statements will need to vary with the FILLFACTOR depending on if the database is updatable or not
The naïve way of running osm2pgsql && psql -f indexes.sql will lead to a period of time when only one index is being built. This is especially bad for slim imports with the way node index.
Index builds should be run in parallel, but psql -f can't handle this, requiring more elaborate SQL runners
VACUUM ANALYZE should be run after index building, not before
Instead, the index builds should be run, in parallel, for each table once the table has been sorted
With the flex backend it should be possible to specify multiple indexes for each table. It needs to be possible to specify the name (e.g. admin), index type (e.g. GIST), columns or expression (e.g. ST_PointOnSurface(way)), and partial index predicate (e.g. name IS NOT NULL AND boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4')). osm2pgsql would supply the storage_parameter based on if it is updatable and tablespace_name, if a tablespace is set.
The text was updated successfully, but these errors were encountered:
Many transforms need additional indexes to be used. Currently this is commonly done as a .sql file distributed alongside the transforms, but this is not ideal for a few reasons
osm2pgsql && psql -f indexes.sql
will lead to a period of time when only one index is being built. This is especially bad for slim imports with the way node index.psql -f
can't handle this, requiring more elaborate SQL runnersInstead, the index builds should be run, in parallel, for each table once the table has been sorted
With the flex backend it should be possible to specify multiple indexes for each table. It needs to be possible to specify the name (e.g.
admin
), index type (e.g.GIST
), columns or expression (e.g.ST_PointOnSurface(way)
), and partial index predicate (e.g.name IS NOT NULL AND boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4')
). osm2pgsql would supply thestorage_parameter
based on if it is updatable and tablespace_name, if a tablespace is set.The text was updated successfully, but these errors were encountered: