signum-node icon indicating copy to clipboard operation
signum-node copied to clipboard

Add index to speed up table account_balance

Open frankTheTank72 opened this issue 3 years ago • 0 comments

We should have unique index on account_balance with id and height: ALTER TABLE account_balance ADD UNIQUE INDEX account_balance_id_height_idx (id, height);

This would speed up the roll-back with a query like this:

select distinct account_balance.id from account_balance where account_balance.height > 1087428

frankTheTank72 avatar Dec 04 '22 16:12 frankTheTank72