lotus
lotus copied to clipboard
feat: cli,events: speed up backfill with temporary index
From experience running this:
- Add a warning about running this against a node that's actively collecting events, you'll have trouble
- Use
IMMEDIATEtransactions so we know as soon as we start a transaction whether we can get an exclusive lock for a write or not so we can error more easily. - Add an optional temporary index for our query which significantly speeds up this process (a lot).
- Run an optional vacuum after we're done.