This directory contains an implementation of Multi-Entry Search Trees for MobilityDB data types.
You should also set the following in postgresql.conf depending on the version of PostGIS and MobilityDB you have installed (below we use PostGIS 3, MobilityDB 1.2):
shared_preload_libraries = 'postgis-3,libMobilityDB-1.2'
Compiling and installing the extension
make
sudo make install
Enabling the mobilitydb_mest
extension
CREATE EXTENSION mobilitydb_mest CASCADE;
Create a Multi-Entry R-Tree on the tstzspan
column from the table tbl_tstzspan(id int, t tstzspan)
CREATE INDEX tbl_tstzspan_mrtree_idx ON trips USING MGIST(t);
Create a Multi-Entry Quadtree on the tgeompoint
column trip
from the table trips(id int, trip tgeompoint)
CREATE INDEX trips_trip_mquadtree_idx ON trips USING MSPGIST(trip);
The access methods have an optional parameter that sets the maximum number of “boxes” stored in the index. This parameter is typically used to control the size of the resulting index.
Create a Multi-Entry R-Tree on the tstzspan
column from the table tbl_tstzspan(id int, t tstzspan)
specifying a maximum number of spans per row.
CREATE INDEX tbl_tstzspanset_mrtree_opts_idx ON tbl_tstzspan
USING MGIST(p tstzspanset_mrtree_ops (max_ranges = 3));
Create a Multi-Entry Quad-Tree on the tgeompoint
column from the table tbl_tstzmultirange(id int, t tgeompoint)
specifying a maximum number of boxes per row.
CREATE INDEX tbl_tgeompoint_mquadtree_opts_idx ON tbl_tgeompoint
USING MSPGIST(t multirange_mquadtree_ops (max_boxes = 3));
Contact: Maxime Schoemans [email protected]