Skip to content

Commit

Permalink
feat(chstorage): change log schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Dec 4, 2023
1 parent d2632d7 commit 51fdbd0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/chstorage/schema_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ CREATE TABLE IF NOT EXISTS %s
INDEX idx_log_attr_value mapValues(attributes) TYPE bloom_filter(0.01) GRANULARITY 1
)
ENGINE = MergeTree
PRIMARY KEY (severity_number, service_namespace, service_name, toStartOfFiveMinutes(timestamp))
ORDER BY (severity_number, service_namespace, service_name, toStartOfFiveMinutes(timestamp), timestamp)
PRIMARY KEY (severity_number, service_namespace, service_name, cityHash64(resource), timestamp)
SETTINGS index_granularity=8192, ttl_only_drop_parts = 1;
`

Expand Down

0 comments on commit 51fdbd0

Please sign in to comment.