perf: significant query speedup when using kinds.

fixes: https://todo.sr.ht/~gheartsfield/nostr-rs-relay/51
This commit is contained in:
Greg Heartsfield 2022-12-14 21:03:18 -06:00
parent 5fa24bc9f1
commit 9e9c494367

View File

@ -52,6 +52,7 @@ CREATE INDEX IF NOT EXISTS created_at_index ON event(created_at);
CREATE INDEX IF NOT EXISTS author_index ON event(author);
CREATE INDEX IF NOT EXISTS delegated_by_index ON event(delegated_by);
CREATE INDEX IF NOT EXISTS kind_index ON event(kind);
CREATE INDEX IF NOT EXISTS kind_created_index ON event(kind,created_at);
-- Tag Table
-- Tag values are stored as either a BLOB (if they come in as a