Creates index for sqlite WHERE query optimization

This commit is contained in:
Oleg Silkin 2019-07-18 13:06:36 -04:00
parent 19fce5f1b4
commit 77f68694e2

View file

@ -36,7 +36,9 @@ CREATE TABLE IF NOT EXISTS CHANNEL(
-- indexes
-- DROP INDEX IF EXISTS COMMENT_CLAIM_INDEX;
CREATE INDEX IF NOT EXISTS COMMENT_CLAIM_INDEX ON COMMENT (LbryClaimId);
CREATE INDEX IF NOT EXISTS CLAIM_COMMENT_INDEX ON COMMENT (LbryClaimId, CommentId);
CREATE INDEX IF NOT EXISTS CHANNEL_COMMENT_INDEX ON COMMENT (ChannelId, CommentId);
-- VIEWS