Skip to content

Improve performance problems identified by Issue #679#692

Merged
mschoema merged 5 commits intoMobilityDB:masterfrom
estebanzimanyi:issue_679
Aug 5, 2025
Merged

Improve performance problems identified by Issue #679#692
mschoema merged 5 commits intoMobilityDB:masterfrom
estebanzimanyi:issue_679

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

No description provided.

@estebanzimanyi estebanzimanyi requested a review from mschoema August 4, 2025 14:53
Copy link
Copy Markdown
Member

@mschoema mschoema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes seem good, but why did the test results change?

@estebanzimanyi
Copy link
Copy Markdown
Member Author

There are two reasons for the tests to change.

Since by default the unary_union boolean is set to false the resulting geometries have more points or composing geometries as shown below

SELECT ST_AsText(trajectory(tgeompoint '[Point(0 0)@2001-01-01, Point(0 1)@2001-01-02, Point(0 0)@2001-01-03]'));
-- LINESTRING(0 0,0 1,0 0)
SELECT ST_AsText(trajectory(tgeompoint '[Point(0 0)@2001-01-01, Point(0 1)@2001-01-02, Point(0 0)@2001-01-03]', true));
-- LINESTRING(0 0,0 1)
SELECT ST_AsText(traversedArea(tgeometry '[Point(1 1)@2001-01-01,
Linestring(1 1,2 2)@2001-01-02, Point(1 1)@2001-01-03]'));
-- GEOMETRYCOLLECTION(POINT(1 1),LINESTRING(1 1,2 2))
SELECT ST_AsText(traversedArea(tgeometry '[Point(1 1)@2001-01-01,
Linestring(1 1,2 2)@2001-01-02, Point(1 1)@2001-01-03]', true));
-- LINESTRING(1 1,2 2)

In addition, the unary_union introduces floating point imprecision that makes that equality or containment tests do not give the same number of results.

@mschoema mschoema merged commit dc70401 into MobilityDB:master Aug 5, 2025
16 checks passed
@mschoema mschoema deleted the issue_679 branch August 5, 2025 17:51
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.

2 participants