[OSM-dev] Running PostGIS on limited memory

Olivier Macchioni olivier.macchioni at gmail.com
Wed Mar 7 20:54:11 GMT 2007


Hi John, hi all...

That sounds reasonable, but one of the design assumptions that the
> current code makes is that the dataset is 'dense' i.e. most nodes,
> segment and way IDs exist and have data. This is why the current code
> uses static arrays for these which is more efficient than a dynamic
> structure (e.g. std::map). If however we assumed however a sparse data
> set then some dynamic storage system for nodes/segments/ways would be
> more efficient.



For what is't worth, on a DB which is a few weeks old:

mysql> select max(id), count(*), max(id)/count(*) from nodes;
+----------+----------+------------------+
| max(id)  | count(*) | max(id)/count(*) |
+----------+----------+------------------+
| 25399795 |  7618099 |             3.33 |
+----------+----------+------------------+
1 row in set (0.01 sec)

mysql> select max(id), count(*), max(id)/count(*) from segments;
+----------+----------+------------------+
| max(id)  | count(*) | max(id)/count(*) |
+----------+----------+------------------+
| 21392044 |  7539635 |             2.84 |
+----------+----------+------------------+
1 row in set (0.07 sec)

On the performance side, obviously allocating a static array once is much
faster than playing with hashes.

Mac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070307/8d0b65d3/attachment.html>


More information about the dev mailing list