Skip to content

feat: set paramter bucket_max_span_seconds in timeseries collection creation#133

Open
retoflow-fricke wants to merge 1 commit intodevelopfrom
feat/timeseries_bucket_size
Open

feat: set paramter bucket_max_span_seconds in timeseries collection creation#133
retoflow-fricke wants to merge 1 commit intodevelopfrom
feat/timeseries_bucket_size

Conversation

@retoflow-fricke
Copy link
Collaborator

  • set bucket size for timeseries collection creation
  • consider using bucket_max_span_seconds if you expect to query data for fixed time intervals, such as every 15 minutes starting at midnight. Ensuring buckets don't overlap between those periods optimizes for high query volume and insert operations
  • this option increases the performance if the correct bucket size is set, at least 5 fold

@retoflow-fricke retoflow-fricke added the enhancement New feature or request label Nov 5, 2025
@jthurner
Copy link
Collaborator

jthurner commented Nov 7, 2025

👍

Granularity is currently hard-coded to "minutes".
In mongodb granularity is an optional parameter defaulting to seconds.

To be in line with the upstream API, shouldn't we also add granularity as an optional argument (not setting it if None -> defaults to seconds), and throw an error if both granularity and bucket_max_span_seconds are passed?

ping @lthurner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants