[Tile-serving] [osm2pgsql] Allow method of specifying custom partial indexes (#166)

Robert Buchholz notifications at github.com
Wed Jul 16 19:05:14 UTC 2014


Creating indices during import is likely to be a bad idea.

First, updating an index while inserting `N` row one bye one is much more expensive than first inserting `N` rows in a table and then building the index over the complete set of rows. This is because after each insertion the index has to be kept in sync with the table data.

Second, AFAIK most of osm2pgsql is I/O bound (and not CPU bound), and so is index creation. Giving it additional parallel I/O-bound jobs to do is unlikely to speed up the data import, no matter how many CPU cores your server has. On a hard disk (as opposed to a SSD) it may actually slow the import down, because the jobs of data import and index creation compete for the hard disk, which necessitates additional slow drive seeks.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/166#issuecomment-49211682
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20140716/9c5df8a5/attachment.html>


More information about the Tile-serving mailing list