Add btree index on history table (#345)

This speeds up a whole bunch of our queries by a *lot* :)
This commit is contained in:
Ellie Huxtable 2022-04-26 09:32:59 +01:00 committed by GitHub
parent b692e0cee0
commit 4030de4bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1 @@
create index concurrently if not exists "history_idx" on history using btree (user_id, timestamp);