From 4fc619262ce0dba2feba80c14b2f9617f61482c2 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 17 Feb 2020 16:33:57 -0500 Subject: [PATCH] replacing indexes on trending_global, trending_mixed to be trending_group, trending_mixed --- lbry/wallet/server/db/writer.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lbry/wallet/server/db/writer.py b/lbry/wallet/server/db/writer.py index 94339fbb6..215f7ee66 100644 --- a/lbry/wallet/server/db/writer.py +++ b/lbry/wallet/server/db/writer.py @@ -133,19 +133,18 @@ class SQLDB: -- common ORDER BY create unique index if not exists claim_effective_amount_idx on claim (effective_amount, claim_hash, release_time); create unique index if not exists claim_release_time_idx on claim (release_time, claim_hash); - create unique index if not exists claim_trending_global_mixed_idx on claim (trending_global, trending_mixed, claim_hash); create unique index if not exists claim_trending_group_mixed_idx on claim (trending_group, trending_mixed, claim_hash); create unique index if not exists filter_fee_amount_order_release_time_idx on claim (fee_amount, release_time, claim_hash); - create unique index if not exists claim_type_trending_idx on claim (claim_type, trending_global, trending_mixed, claim_hash); + create unique index if not exists claim_type_trending_idx on claim (claim_type, trending_group, trending_mixed, claim_hash); create unique index if not exists claim_type_release_idx on claim (claim_type, release_time, claim_hash); 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 channel_hash_trending_idx on claim (channel_hash, trending_group, trending_mixed, claim_hash); + create unique index if not exists channel_hash_effective_amount_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); + create unique index if not exists filter_stream_duration_idx on claim (duration, trending_group, trending_mixed, claim_hash); -- TODO: verify that all indexes below are used create index if not exists claim_height_normalized_idx on claim (height, normalized asc);