From c0fc40c27ab7f3e9665fc49eb907d3b2c95ac656 Mon Sep 17 00:00:00 2001 From: trinity-1686a Date: Mon, 18 Mar 2024 17:56:34 +0100 Subject: [PATCH] add index on time-range fields (#4759) --- .../postgresql/17_create-index-split-timestamp.down.sql | 2 ++ .../postgresql/17_create-index-split-timestamp.up.sql | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 quickwit/quickwit-metastore/migrations/postgresql/17_create-index-split-timestamp.down.sql create mode 100644 quickwit/quickwit-metastore/migrations/postgresql/17_create-index-split-timestamp.up.sql diff --git a/quickwit/quickwit-metastore/migrations/postgresql/17_create-index-split-timestamp.down.sql b/quickwit/quickwit-metastore/migrations/postgresql/17_create-index-split-timestamp.down.sql new file mode 100644 index 00000000000..0a0ef3aa50f --- /dev/null +++ b/quickwit/quickwit-metastore/migrations/postgresql/17_create-index-split-timestamp.down.sql @@ -0,0 +1,2 @@ +DROP INDEX IF EXISTS splits_time_range_start_idx; +DROP INDEX IF EXISTS splits_time_range_end_idx; diff --git a/quickwit/quickwit-metastore/migrations/postgresql/17_create-index-split-timestamp.up.sql b/quickwit/quickwit-metastore/migrations/postgresql/17_create-index-split-timestamp.up.sql new file mode 100644 index 00000000000..855147abce4 --- /dev/null +++ b/quickwit/quickwit-metastore/migrations/postgresql/17_create-index-split-timestamp.up.sql @@ -0,0 +1,2 @@ +CREATE INDEX IF NOT EXISTS splits_time_range_start_idx ON splits (time_range_start); +CREATE INDEX IF NOT EXISTS splits_time_range_end_idx ON splits (time_range_end);