[OSM-dev] getnodes query optimization

Immanuel Scholz immanuel.scholz at gmx.de
Tue Jun 6 13:18:56 BST 2006


Hi,


> simply add a flag to the dataset that states when something is current.
> SteveC is under the impression that this will slow things down
> unneccesarily: I feel that the 4x improvement it offers in selects would
> be beneficial enough to make it a worthwhile change.

Please make sure, that you encapsulate everything correct into
transactions when doing so.

Currently the insert operations are atomic (since it happen to be only one
insert or it doesn't matter what order they are done).

If you keep such a latest-flag, then it has to be removed from the old
line on every history change. This'll be a race for concurrent inserts.



My preferences would be to have an seperate database (or several seperate
ones) instead (or in addition to change the main database) which serves
read-only data.

I already made "little-osm", an small and lightweight ruby-server using a
very specialized database layout optimized only for map requests. Feel
free to be inspired by it ;-)  (it's in the main svn tree).


Ciao, Imi






More information about the dev mailing list