[Tile-serving] [osm2pgsql] unique ids - force (#446)

Paul Norman notifications at github.com
Fri Sep 4 06:44:47 UTC 2015


If you are rendering you do **not** want to disable splitting as performance will suffer severely.

For analysis and complex queries, osm_id is generally close enough to a primary key.

* It is not null
* Any rows with the same osm_id can only differ in `way` and `way_area`
* For real data, the statistical properties are the same, i.e. the number of values is approximately the number of rows

I don't think I've yet encountered a situation where uniqueness is  **necessary**, though it would make some queries easier (e.g. gravitystorm/openstreetmap-carto#596)

If you have additional information about a specific OSM object in another table, you can still JOIN against the osm_id.

ST_Union, ST_Collect, ST_UnaryUnion, and GROUP BY are what you need.

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


More information about the Tile-serving mailing list