-
Notifications
You must be signed in to change notification settings - Fork 526
Description
In #4908 we observed that inserting rows is much faster using the postgres COPY
command. We can use this property to improve the performance of the ClaimableBalancesChangeProcessor . The ClaimableBalancesChangeProcessor upserts rows into the claimable_balances
and claimable_balance_claimants
tables.
However, because claimable balances are either created or removed it turns out that we never have to modify existing rows of claimable_balances
and claimable_balance_claimants
. The create claimable balance operation creates a claimable balance and the claim operation removes the claimable balance from the ledger. There is no way to mutate a claimable balance once created.
This means we can update the ClaimableBalancesChangeProcessor to use COPY to insert into the the claimable_balances
and claimable_balance_claimants
tables. We expect that to be faster than the current code which bulk inserts rows into the claimable_balances
and claimable_balance_claimants
tables.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status