[OSM-dev] Too many slow queries in db

Andreas Hubel andi at saerdnaer.de
Tue Sep 4 15:31:03 BST 2007


Tom Hughes schrieb:
> The slow queries will essentially all be along the lines of:
> 
>   SELECT ... FROM current_nodes
>   WHERE latitude BETWEEN ... AND ...
>     AND longitude BETWEEN ... AND ...
> 
> and things like this:
> 
>   SELECT ... FROM gps_points
>   WHERE latitude BETWEEN ... AND ...
>     AND longitude BETWEEN ... AND ...
>   ORDER BY timestamp
>   LIMIT 10000, 5000

As far as I now, has the PostGIS extension of Postgres some optimations
for queries like that. Maybe its an workaround idea to exchange mysql
throth postgres and use the same schema as we have it now, to make use
of this optimations.
Okay I don't know how good ruby works together with postgres and how
long an convert of mysql tables to postgres tables would take, but it's
just an idea.

A few weeks ago I met Jeroen, who showed me some pices of code and
schemas, he used/uses for the AND import. Its nice to see thats
possible to write an readonly osm api for JOSM and so on in python which
only lasts two screen pages ;-)
Maybe this is some code where to see how postgis could work with osm...

Andi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070904/93192f95/attachment.pgp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070904/93192f95/attachment-0001.pgp>


More information about the dev mailing list