Add COPY support for inserting multiple rows in a single operation. #328

Merged
telackey merged 16 commits from telackey/copyfrom into v1.11.2-statediff-v4 2023-03-10 02:02:40 +00:00
Contributor

Use COPY rather than INSERT to minimize operations and round trips. Previously, we averaged about 5K DB operations per block. This should drop it to under 20.

The effect is visible below, reducing the DB write time per block on vulture from ~12s to ~1.2s.

The use of COPY is controlled by --statediff.db.copyfrom=true|false

Screenshot 2023-03-08 at 10 42 42 PM
Use COPY rather than INSERT to minimize operations and round trips. Previously, we averaged about 5K DB operations per block. This should drop it to under 20. The effect is visible below, reducing the DB write time per block on vulture from ~12s to ~1.2s. The use of COPY is controlled by `--statediff.db.copyfrom=true|false` <img width="1831" alt="Screenshot 2023-03-08 at 10 42 42 PM" src="https://user-images.githubusercontent.com/1649771/223919180-423da4ef-a15e-4578-8c63-eeab30da5711.png">
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#328