Geo joins look innocent:
SELECT * FROM A JOIN B ON ST_Intersects(A.geo, B.geo);
…but at scale they can become the query that ruins your day.
Geospatial functions are expensive, and they often force a loop join that starts to feel quadratic as your tables grow.
The core idea in this post is simple: we’ll see how Floe automatically rewrites this kind of query and takes advantage of H3 indexes for dramatic speedup.
What’s a geo join
A geo join is any join whose ON clause is a spatial predicate:
ST_Intersects
ST_Covers
ST_DWithin
... continue reading