From 4030de4bea0f3b2d4e9a9f9d581fe2657b61eac1 Mon Sep 17 00:00:00 2001
From: Ellie Huxtable <ellie@elliehuxtable.com>
Date: Tue, 26 Apr 2022 09:32:59 +0100
Subject: Add btree index on history table (#345)

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

(limited to '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 00000000..2d2a5633
--- /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);
-- 
cgit v1.3.1

