mapbox / Hecate

Fast Geospatial Feature Storage API
MIT License
252 stars 36 forks source link

Optimize Boundaries Query #147

Closed ingalls closed 5 years ago

ingalls commented 5 years ago

Context

We use state bounds internally for managing some parts of our address data pipeline. WV & VA boundaries have been giving us trouble due to their size and the fact they are represented poorly in BBOX based spatial indexes.

This PR optimizes complicated bounds by breaking them into smaller sections before running ST_Intersect

New Time

real    16m11.753s
user    0m16.965s
sys     0m0.254s

Previous Time

real    77m23.536s
user    0m17.230s
sys     0m0.200s

cc/ @ingalls