You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function is very, very slow on large tables without an index onosm_id. We should at the very least warn if an index doesn't exist here. This might mean we have a startup function that looks for all of the required indices (this one, and some geometry indices needed elsewhere).
_q=f"SELECT * from {layer} WHERE {layer}.{id_field} = {id}"
_r=self.data.ExecuteSQL(_q)
iflen(_r) >1:
warnings.warn(
f"More than one ID match for {id_field}:{id} (layer: {layer})"
)
return_r.GetNextFeature()
We could also add the index, but that's harder..
The text was updated successfully, but these errors were encountered:
acannistra
changed the title
Check for osm_id index before querying tables via osm_id
Check for ID field index before querying tables via id
Apr 19, 2022
This function is very, very slow on large tables without an index on
osm_id
. We should at the very least warn if an index doesn't exist here. This might mean we have a startup function that looks for all of the required indices (this one, and some geometry indices needed elsewhere).changegen/changegen/db.py
Lines 76 to 83 in ba1ed0f
We could also add the index, but that's harder..
The text was updated successfully, but these errors were encountered: