From 067417361fde6917c870eeac63985ceb18d9740d Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Tue, 26 Apr 2022 09:11:13 +0100 Subject: [PATCH] Add btree index on history table This speeds up a whole bunch of our queries by a *lot* :) --- atuin-server/migrations/20220426080938_history-index.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 atuin-server/migrations/20220426080938_history-index.sql diff --git a/atuin-server/migrations/20220426080938_history-index.sql b/atuin-server/migrations/20220426080938_history-index.sql new file mode 100644 index 00000000000..2d2a563368e --- /dev/null +++ b/atuin-server/migrations/20220426080938_history-index.sql @@ -0,0 +1 @@ +create index concurrently if not exists "history_idx" on history using btree (user_id, timestamp);