You are not logged in.

#1 2020-11-09 10:07:41

Alexey Murz Korepov
Registered: 2020-11-05
Posts: 5

Overpass-API: Does order of conditions affect performance of query?

For example, I need to get all cities of some country, so I built this query:

out qt;

It executes not so quickly, because, seems, Overpass at first lookup all nodes, matched to `myarea`, and after this - filter them via `place="city"`, yes?

So if I modify the query to this:

out qt;

Overpass will do first filter of nodes via `place="city"`, that must execute much quicker because of direct match, than area match query, and in second iteration - filter only little part of nodes by `myarea` area.

Is my guess right, or Overpass have some query optimizer, that will do this for all queries?

Last edited by Alexey Murz Korepov (2020-11-09 10:08:17)


Board footer

Powered by FluxBB