Skip to content

Commit

Permalink
Slim down the ClickHouse database
Browse files Browse the repository at this point in the history
- Add TTLs to all field tables, by using a materialized column with the
  time each record is inserted. ClickHouse will retain the latest
  timestamp, so when we stop inserting, the TTL clock will start
  counting down on those timeseries records.
- Update Dropshot dependency.
- Add operation ID to HTTP service timeseries, remove other fields.
  Expunge the old timeseries too.
- Remove unnecessary stingifying of URIs in latency tracking.
- Fixes #6328 and #6331
  • Loading branch information
bnaecker committed Aug 15, 2024
1 parent 5646755 commit 2d4b7d8
Show file tree
Hide file tree
Showing 81 changed files with 206 additions and 123 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i64_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i64_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i64_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_uuid_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_uuid_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_uuid_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_bool_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_bool_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_bool_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_ipaddr_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_ipaddr_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_ipaddr_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_string_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_string_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_string_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i8_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i8_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i8_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u8_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u8_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u8_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i16_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i16_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i16_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u16_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u16_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u16_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i32_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i32_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i32_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u32_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u32_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u32_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u64_local ON CLUSTER oximeter_cluster ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u64_local ON CLUSTER oximeter_cluster MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u64_local ON CLUSTER oximeter_cluster MODIFY TTL last_updated_at + INTERVAL 30 DAY;
1 change: 1 addition & 0 deletions oximeter/db/schema/replicated/10/timeseries-to-delete.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http_service:request_latency_histogram
12 changes: 8 additions & 4 deletions oximeter/db/schema/replicated/db-init-1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_i64_local ON CLUSTER oximeter_cluster
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value Int64
field_value Int64,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_i64_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_i64 ON CLUSTER oximeter_cluster
AS oximeter.fields_i64_local
Expand All @@ -93,10 +95,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_uuid_local ON CLUSTER oximeter_cluste
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value UUID
field_value UUID,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_uuid_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_uuid ON CLUSTER oximeter_cluster
AS oximeter.fields_uuid_local
Expand Down
60 changes: 40 additions & 20 deletions oximeter/db/schema/replicated/db-init-2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_bool_local ON CLUSTER oximeter_cluste
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value UInt8
field_value UInt8,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_bool_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_bool ON CLUSTER oximeter_cluster
AS oximeter.fields_bool_local
Expand All @@ -609,10 +611,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_ipaddr_local ON CLUSTER oximeter_clus
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value IPv6
field_value IPv6,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_ipaddr_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_ipaddr ON CLUSTER oximeter_cluster
AS oximeter.fields_ipaddr_local
Expand All @@ -623,10 +627,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_string_local ON CLUSTER oximeter_clus
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value String
field_value String,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_string_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_string ON CLUSTER oximeter_cluster
AS oximeter.fields_string_local
Expand All @@ -637,10 +643,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_i8_local ON CLUSTER oximeter_cluster
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value Int8
field_value Int8,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_i8_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_i8 ON CLUSTER oximeter_cluster
AS oximeter.fields_i8_local
Expand All @@ -651,10 +659,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_u8_local ON CLUSTER oximeter_cluster
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value UInt8
field_value UInt8,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_u8_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_u8 ON CLUSTER oximeter_cluster
AS oximeter.fields_u8_local
Expand All @@ -665,10 +675,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_i16_local ON CLUSTER oximeter_cluster
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value Int16
field_value Int16,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_i16_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_i16 ON CLUSTER oximeter_cluster
AS oximeter.fields_i16_local
Expand All @@ -679,10 +691,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_u16_local ON CLUSTER oximeter_cluster
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value UInt16
field_value UInt16,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_u16_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_u16 ON CLUSTER oximeter_cluster
AS oximeter.fields_u16_local
Expand All @@ -693,10 +707,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_i32_local ON CLUSTER oximeter_cluster
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value Int32
field_value Int32,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_i32_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_i32 ON CLUSTER oximeter_cluster
AS oximeter.fields_i32_local
Expand All @@ -707,10 +723,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_u32_local ON CLUSTER oximeter_cluster
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value UInt32
field_value UInt32,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_u32_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_u32 ON CLUSTER oximeter_cluster
AS oximeter.fields_u32_local
Expand All @@ -721,10 +739,12 @@ CREATE TABLE IF NOT EXISTS oximeter.fields_u64_local ON CLUSTER oximeter_cluster
timeseries_name String,
timeseries_key UInt64,
field_name String,
field_value UInt64
field_value UInt64,
last_updated_at DateTime MATERIALIZED now()
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/fields_u64_local', '{replica}')
ORDER BY (timeseries_name, field_name, field_value, timeseries_key);
ORDER BY (timeseries_name, field_name, field_value, timeseries_key)
TTL last_updated_at + INTERVAL 30 DAY;

CREATE TABLE IF NOT EXISTS oximeter.fields_u64 ON CLUSTER oximeter_cluster
AS oximeter.fields_u64_local
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_bool ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_bool MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_bool MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i8 ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i8 MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i8 MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u8 ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u8 MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u8 MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i16 ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i16 MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i16 MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u16 ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u16 MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u16 MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i32 ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i32 MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i32 MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u32 ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u32 MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u32 MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i64 ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i64 MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_i64 MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u64 ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u64 MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_u64 MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_ipaddr ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_ipaddr MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_ipaddr MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_string ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_string MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_string MODIFY TTL last_updated_at + INTERVAL 30 DAY;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_uuid ADD COLUMN IF NOT EXISTS last_updated_at DateTime MATERIALIZED now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_uuid MATERIALIZE COLUMN last_updated_at;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE oximeter.fields_uuid MODIFY TTL last_updated_at + INTERVAL 30 DAY;
1 change: 1 addition & 0 deletions oximeter/db/schema/single-node/10/timeseries-to-delete.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http_service:request_latency_histogram
Loading

0 comments on commit 2d4b7d8

Please sign in to comment.