Post

Incidents are no fun - but I think I’ve learned more about Postgres and query optimizations in the past 3 weeks than the rest of my career combined.

0 reposts4 likes

ST_Intersects(geometry, geometry) will gladly give you a distance of 0 if you ask for it … after checking every possible point combination?!

If you lateral join on a subquery depending on a WHERE filter - then you better hoist that subquery out or Postgres will just read out every possible value