Merge remote-tracking branch 'upstream/main' into merge-gramsrv-9106877
This commit is contained in:
commit
ac6a50c5ff
697 changed files with 100880 additions and 8052 deletions
|
|
@ -0,0 +1,22 @@
|
|||
-- payments.getStarsTransactions applies the sign predicate before keyset LIMIT.
|
||||
-- Partial owner/id indexes keep sparse inbound/outbound histories bounded even
|
||||
-- when one account or channel has a long run of transactions in the other direction.
|
||||
CREATE INDEX stars_transactions_user_incoming_idx
|
||||
ON public.stars_transactions(user_id, id DESC) WHERE amount > 0;
|
||||
CREATE INDEX stars_transactions_user_outgoing_idx
|
||||
ON public.stars_transactions(user_id, id DESC) WHERE amount < 0;
|
||||
|
||||
CREATE INDEX ton_transactions_user_incoming_idx
|
||||
ON public.ton_transactions(user_id, id DESC) WHERE amount_nanoton > 0;
|
||||
CREATE INDEX ton_transactions_user_outgoing_idx
|
||||
ON public.ton_transactions(user_id, id DESC) WHERE amount_nanoton < 0;
|
||||
|
||||
CREATE INDEX channel_stars_transactions_incoming_idx
|
||||
ON public.channel_stars_transactions(channel_id, id DESC) WHERE amount > 0;
|
||||
CREATE INDEX channel_stars_transactions_outgoing_idx
|
||||
ON public.channel_stars_transactions(channel_id, id DESC) WHERE amount < 0;
|
||||
|
||||
CREATE INDEX channel_ton_transactions_incoming_idx
|
||||
ON public.channel_ton_transactions(channel_id, id DESC) WHERE amount_nanoton > 0;
|
||||
CREATE INDEX channel_ton_transactions_outgoing_idx
|
||||
ON public.channel_ton_transactions(channel_id, id DESC) WHERE amount_nanoton < 0;
|
||||
Loading…
Add table
Add a link
Reference in a new issue