Skip to content

fix(parca): preserve exact ClickHouse time ranges - #4

Open
alexon1234 wants to merge 7 commits into
main-altfrom
fix/pltf-965-indexed-time-filters
Open

fix(parca): preserve exact ClickHouse time ranges#4
alexon1234 wants to merge 7 commits into
main-altfrom
fix/pltf-965-indexed-time-filters

Conversation

@alexon1234

Copy link
Copy Markdown

Fixes PLTF-965

Parca ClickHouse time-range queries need the primary-key pruning provided by the millisecond timestamp column without changing the query API's exact nanosecond range semantics. The query path now combines the indexed timestamp range with the exact time_nanos bounds.

Summary

Test plan

  • go test ./...
  • golangci-lint run — 0 issues.
  • UI lint — 0 errors (existing warnings only).
  • buf lint — passed with the repository's deprecation warning.
  • Built and ran parca-pr3:fixed with ClickHouse 25.8.
  • Verified a sub-millisecond out-of-range sample is excluded.

javicj and others added 6 commits September 4, 2026 11:21
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.
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