<div dir="ltr">hey there,<div><br></div><div><a href="https://trac.osgeo.org/postgis/ticket/3521">https://trac.osgeo.org/postgis/ticket/3521</a> floated nearby me and broke my heart.<br></div><div><br></div><div>Can we have SELECT DISTINCT work for sure as a complete compare, not just bbox one?</div><div><br></div><div>It also touches the topic of sorting the boxes - it seems now they're sorted by X, then by Y - which is usually a poor way to preserve spatial locality. Can we sort by z-order curve instead? just bit-mix all the coordinates: <a href="https://en.wikipedia.org/wiki/Z-order_curve">https://en.wikipedia.org/wiki/Z-order_curve</a> - that will make painful voodoo stuff like ORDER BY ST_GeoHash(ST_Transfrom(ST_Centroid(geom),4326)) much cleaner and replace it with just CLUSTER (see <a href="https://github.com/openstreetmap/osm2pgsql/issues/208">https://github.com/openstreetmap/osm2pgsql/issues/208</a> ).</div></div>