From 0b2d9e15b44a8de9d52ea0d12c85ee7b0550959b Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 17 Feb 2020 17:12:53 -0500 Subject: [PATCH] added order bys for fee_amount --- lbry/wallet/server/db/writer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lbry/wallet/server/db/writer.py b/lbry/wallet/server/db/writer.py index 95518672f..179c2176d 100644 --- a/lbry/wallet/server/db/writer.py +++ b/lbry/wallet/server/db/writer.py @@ -155,8 +155,12 @@ class SQLDB: create unique index if not exists duration_trending_idx on claim (duration, trending_group, trending_mixed, claim_hash); create unique index if not exists duration_effective_amount_idx on claim (duration, effective_amount, claim_hash); + -- fee_amount + order by + create unique index if not exists fee_amount_release_idx on claim (fee_amount, release_time, claim_hash); + create unique index if not exists fee_amount_trending_idx on claim (fee_amount, trending_group, trending_mixed, claim_hash); + create unique index if not exists fee_amount_effective_amount_idx on claim (fee_amount, effective_amount, claim_hash); + -- TODO: verify that all indexes below are used - create unique index if not exists filter_fee_amount_order_release_time_idx on claim (fee_amount, release_time, claim_hash); create index if not exists claim_height_normalized_idx on claim (height, normalized asc); create index if not exists claim_resolve_idx on claim (normalized, claim_id); create index if not exists claim_id_idx on claim (claim_id, claim_hash);