Skip to content

Clichouse v20.4 performance issue #11482

@bobrik

Description

@bobrik

Describe the situation

I'm seeing slower than expected queries on v20.4.4.18-stable compared to v20.1:20.1.4.14-stable.

My schema:

CREATE TABLE jaeger_index_v2 (
  timestamp DateTime CODEC(Delta, ZSTD(1)),
  traceID String CODEC(ZSTD(1)),
  service LowCardinality(String) CODEC(ZSTD(1)),
  operation LowCardinality(String) CODEC(ZSTD(1)),
  durationUs UInt64 CODEC(ZSTD(1)),
  tags Array(String) CODEC(ZSTD(1)),
  INDEX idx_tags tags TYPE bloom_filter(0.01) GRANULARITY 64
) ENGINE MergeTree()
PARTITION BY toDate(timestamp)
ORDER BY (service, timestamp)
SETTINGS index_granularity=1024

My query:

SELECT DISTINCT traceID
  FROM jaeger_index_v2
PREWHERE service = 'nginx-fl'
   AND timestamp >= now() - 3600
   AND timestamp <= now()
 ORDER BY service DESC,
       timestamp DESC
 LIMIT 20

On v20.1 I see ~0.5s per query
On v20.4 I see a very different picture for 1.5s per query.

Metadata

Metadata

Assignees

Labels

comp-datetimeDate/DateTime/TimeZone datatypes and date-time semantics.performance

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions