[postgis-devel] Btree operators

Daniel Baston dbaston at gmail.com
Thu Apr 7 06:22:32 PDT 2016


I've seen plenty of users (including myself) confused by the = operator,
especially when it's implicitly accessed in cases like DISTINCT, DISTINCT
ON(), and GROUP BY.  The workaround, to serialize and do a string compare,
can really add a lot of noise to a query.  Are there benefits that come
from the current behavior of the = operator, besides the (high) value of
backwards compatibility?

Dan

On Thu, Apr 7, 2016 at 7:22 AM, Komяpa <me at komzpa.net> wrote:

> hey there,
>
> https://trac.osgeo.org/postgis/ticket/3521 floated nearby me and broke my
> heart.
>
> Can we have SELECT DISTINCT work for sure as a complete compare, not just
> bbox one?
>
> 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: https://en.wikipedia.org/wiki/Z-order_curve - 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
> https://github.com/openstreetmap/osm2pgsql/issues/208 ).
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20160407/5936362e/attachment.html>


More information about the postgis-devel mailing list