Filters sidebar is timing out

Open
#2,589 4 comments 0 reactions 1 assignee View on GitHub

@knudtty is already working on this.

Since Jul 8, 2026.

Assessment

This issue has not been assessed yet.

Description

external

In #2128 some rollups tables were introduced to be able to use autocomplete.

Image

The filters sidebar are timing out and not loading at all with this warning:

[2026-07-06T17:26:00.757Z][WARN][@clickhouse/client][Config] request_timeout is set to 3600000ms, but send_progress_in_http_headers is not enabled. Long-running queries may fail with socket hang-up errors if they exceed the load balancer idle timeout. Consider enabling progress headers with clickhouse_settings: { send_progress_in_http_headers: 1, http_headers_progress_interval_ms: '<interval>' }. See https://github.com/ClickHouse/clickhouse-js/blob/main/docs/howto/long_running_queries.md for more details.

The filters sidebar is based on these rollup tables:

CREATE TABLE IF NOT EXISTS ${DATABASE}.otel_logs_kv_rollup_15m
(
    `Timestamp` DateTime,
    `ColumnIdentifier` LowCardinality(String),
    `Key` LowCardinality(String),
    `Value` String,
    `count` UInt64,
    INDEX idx_count_minmax count TYPE minmax GRANULARITY 1,
    INDEX idx_timestamp_minmax Timestamp TYPE minmax GRANULARITY 1
)
ENGINE = SummingMergeTree
PARTITION BY toDate(Timestamp)
ORDER BY (ColumnIdentifier, Key, Timestamp, Value)
TTL Timestamp + ${TABLES_TTL}
SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1;

The query ran by HyperDx is not using any of the keys of the table, prompting a full scan of the whole partition.
Even then, slicing on Timestamp would not help a lot, given that its usually ran using the time window of the selection, which can be of multiple days.

SELECT ColumnIdentifier, Key, groupUniqArray(20)(Value) AS Values
FROM logs.otel_logs_kv_rollup_15m
WHERE Value != ''
  AND Timestamp >= toStartOfFifteenMinutes(fromUnixTimestamp64Milli(1783085400000)) AND Timestamp <= toStartOfFifteenMinutes(fromUnixTimestamp64Milli(1783087200000))
GROUP BY ColumnIdentifier, Key
ORDER BY ColumnIdentifier = 'NativeColumn' DESC, ColumnIdentifier = 'ResourceAttributes' DESC, ColumnIdentifier, Key
LIMIT 100

Can this be improved in any way?
Maybe a setting can be added to fix the SELECT params to a subset just for this filters query?

Dominant language
TypeScript
Stars
9.9k
Forks
471
Avg merge
2d 4h
Merged PRs (30d)
117

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hyperdxio/hyperdx

All issues in hyperdxio/hyperdx

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.