From 1e81d6f8484f46d7ecd4ac3fc079012c6ef627de Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 3 Feb 2020 16:41:58 -0500 Subject: [PATCH] added database index for various channel_hash based queries --- lbry/wallet/server/db/writer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lbry/wallet/server/db/writer.py b/lbry/wallet/server/db/writer.py index a8199b608..fbccb06ee 100644 --- a/lbry/wallet/server/db/writer.py +++ b/lbry/wallet/server/db/writer.py @@ -141,6 +141,9 @@ class SQLDB: create unique index if not exists claim_type_effective_amount_idx on claim (claim_type, effective_amount, claim_hash); create unique index if not exists channel_hash_release_time_idx on claim (channel_hash, release_time, claim_hash); + create unique index if not exists channel_hash_trending_idx on claim (channel_hash, trending_global, trending_mixed, claim_hash); + create unique index if not exists channel_hash_trending_idx on claim (channel_hash, effective_amount, claim_hash); + create unique index if not exists filter_stream_duration_idx on claim (duration, trending_global, trending_mixed, claim_hash); -- TODO: verify that all indexes below are used