Skip to content

Answer the MobilityDB operators soundly from a multi-entry key - #32

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:mest-multientry-sound
Aug 28, 2026
Merged

Answer the MobilityDB operators soundly from a multi-entry key#32
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:mest-multientry-sound

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A key of a multi-entry index covers one entry of the indexed value, while the consistent methods of MobilityDB answer for a key that covers the whole value. The operator classes for the temporal, the temporal number and the temporal point types read those methods, and two of their answers do not hold for an entry: contains and same ask the key to hold the query, which no single entry need do even when the value holds it, and the position strategies are exact for a key covering the whole value, so MobilityDB reports that they need no recheck. The multi-entry methods state both corrections, answering contains and same with overlaps and rechecking every strategy, and delegating the rest to MobilityDB, which keeps one implementation of the box semantics. The topological and the position operators of MobilityDB answer on the bounding box of a value; the entries of a value cover the value but not its bounding box, so a query that meets the box where no entry lies has no entry that can find it, and the bounding box is itself a key of the value. Measured on tbl_tint with num_boxes=3, contains reads 35 rows against 105 sequential; tbl_tgeompoint rows 33 and 31 overlap as boxes while no entry of one meets the box of the other, which reads 151 rows against 152. The whole contrib suite, 28 tests, agrees with the sequential scan against a MobilityDB that carries the split-box bound inclusivity fix.

A key of a multi-entry index covers one entry of the indexed value, while the
consistent methods of MobilityDB answer for a key that covers the whole value.
The operator classes for the temporal, the temporal number and the temporal
point types read those methods, and two of their answers do not hold for an
entry: contains and same ask the key to hold the query, which no single entry
need do even when the value holds it, and the position strategies are exact for
a key covering the whole value, so MobilityDB reports that they need no
recheck. The multi-entry methods state both corrections, answering contains and
same with overlaps and rechecking every strategy, and delegate the rest to
MobilityDB, which keeps one implementation of the box semantics.

The topological and the position operators of MobilityDB answer on the bounding
box of a value. The entries of a value cover the value but not its bounding
box, so a query that meets the box where no entry lies had no entry that could
find it: tbl_tgeompoint rows 33 and 31 overlap as boxes while no entry of one
meets the box of the other, and the index read 151 rows against 152 sequential.
The bounding box is itself a key of the value, which gives every strategy that
reads it an entry that answers it.

The whole contrib suite, 28 tests, agrees with the sequential scan.
@estebanzimanyi
estebanzimanyi merged commit bac9b2d into MobilityDB:master Aug 28, 2026
1 check passed
@estebanzimanyi
estebanzimanyi deleted the mest-multientry-sound branch August 28, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant