[OSM-dev] ROMAv2 - now in postgres

Florian Lohoff flo at rfc822.org
Mon Sep 8 21:35:19 BST 2008


Hi,
i tried around with the postgresql stuff as i like postgres more than
mysql and made a ROMAv2 for postgres. Its completely different as it
implements all of the logic in sql and selects data into temp tables
to be able to stream out nodes, way and relations one after another.
So memory usage vs disk io is handled in the database.

The postgres variant is much faster when importing the planet. Its
slower when querier cache hot but faster queried cache cold.
The difference might be due to the pgsql version returning user names
and timestamp informations so it adds cpu overhead.

The URL to try with is here:

http://tiles-two.lab.rfc822.org/api/0.5/map?bbox=

The biggest advantage though is that it seems not to have the obscure
utf-8 bugs i have seen with the mysql. All output i had a look at looked
clean - no strange ???? tags/values ...

Code is here:

http://tiles-two.lab.rfc822.org/~flo/map-pgsql.cgi

Differences to the osmosis simple postgres schema is removal of the ways
bbox as its a cpu time killer and an added btree index on way_id in
ways. See the osmosis patch i send previously.

BTW: Both ROMAs now have a check for the age of the planet in the db and
return 503 in case the planet is older than 15 minutes.

Flo
-- 
Florian Lohoff                  flo at rfc822.org             +49-171-2280134
	Those who would give up a little freedom to get a little 
          security shall soon have neither - Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20080908/c8ba966e/attachment.pgp>


More information about the dev mailing list