Opened 2 years ago

Closed 4 months 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:

Description

  • 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 Changed 2 years ago by komzpa

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 Changed 2 years ago by robe

Version: 2.4.xtrunk

comment:3 Changed 2 years ago by pramsey

Owner: changed from pramsey to komzpa

comment:4 Changed 16 months ago by komzpa

Milestone: PostGIS 2.5.0PostGIS 3.0.0

comment:6 Changed 4 months ago by komzpa

Resolution: fixed
Status: newclosed

In 17600:

Fast Hilbert btree.

Requires btree indexes to be recreated.

Closes https://github.com/postgis/postgis/pull/436
Closes #3883

Note: See TracTickets for help on using tickets.