Skip to content

Optimize phenomenonTime aggregation in update_datastream_phenomenon_time_from_foi#180

Open
Prinxeeee wants to merge 1 commit into
istSOS:mainfrom
Prinxeeee:optimize-phenomenon-time-query
Open

Optimize phenomenonTime aggregation in update_datastream_phenomenon_time_from_foi#180
Prinxeeee wants to merge 1 commit into
istSOS:mainfrom
Prinxeeee:optimize-phenomenon-time-query

Conversation

@Prinxeeee
Copy link
Copy Markdown
Contributor

Optimize phenomenonTime aggregation in update_datastream_phenomenon_time_from_foi

What's changed

Instead of two queries with ORDER BY ... LIMIT 1 to get the lower and upper bounds, this uses a single MIN(lower(...)) / MAX(upper(...)) aggregation.

Why
Reduces query overhead by avoiding duplicate ordered scans while preserving existing behavior.

Notes

  • No behavioral changes are introduced.

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