fix(parca): preserve exact ClickHouse time ranges - #4
Open
alexon1234 wants to merge 7 commits into
Open
Conversation
… initial load query in the dashboard
Keep only the HasProfileData query optimization from the previous commit. The connection pool configuration will be handled separately.
time_nanos is the last column of the table's ORDER BY key, so range filters on it cannot use the primary index and every query read all granules in each day partition. All queries already filter with equality on the five profile type columns that precede timestamp in the sort key, so filtering the time range on timestamp (millis) lets ClickHouse skip granules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes PLTF-965
Parca ClickHouse time-range queries need the primary-key pruning provided by the millisecond
timestampcolumn without changing the query API's exact nanosecond range semantics. The query path now combines the indexed timestamp range with the exacttime_nanosbounds.Summary
timestamp BETWEENfor ClickHouse primary-key pruning.time_nanospredicates for strict and inclusive endpoints.HasProfileDatafast existence check from PR fix(parca): add connection params as overridable settings and improve… #3.Test plan
go test ./...golangci-lint run— 0 issues.buf lint— passed with the repository's deprecation warning.parca-pr3:fixedwith ClickHouse 25.8.