Opened 7 years ago

Closed 5 years ago

#3883 closed enhancement (fixed)

Make B-Tree sorting blazingly fast

Reported by: komzpa Owned by: komzpa
Priority: medium Milestone: PostGIS 3.0.0
Component: postgis Version: master
Keywords: Cc:


  • make gserialized_get_sort_hash function;
  • make it return least possible value on EMPTY;
  • make it read not box, but first coordinate of gserialized. This way no geography/geometry branching is needed, and it should be faster than getting a float-rounded box center for geometries that don't store it;
  • make fast path for complete equality for fast GROUP BY in gserizlized_cmp;
  • create sortsupport function that will employ gserialized_get_sort_hash and full equality fast path;
  • investigate when to abort abbreviated compare in sort. (this is going to happen more often on 32bit machines, as sortsupport key will be 32bit, containing half of 64bit key).

Change History (6)

comment:1 by komzpa, 7 years ago

This ticket is spin off from #3864, it's not possible in 2.4 branch since it will change behavior and require opclass recreation.

comment:2 by robe, 7 years ago

Version: 2.4.xtrunk

comment:3 by pramsey, 6 years ago

Owner: changed from pramsey to komzpa

comment:4 by komzpa, 6 years ago

Milestone: PostGIS 2.5.0PostGIS 3.0.0

comment:6 by komzpa, 5 years ago

Resolution: fixed
Status: newclosed

In 17600:

Fast Hilbert btree.

Requires btree indexes to be recreated.

Closes #3883

Note: See TracTickets for help on using tickets.