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">
dboreham reviewed 2023-03-07 18:25:21 +00:00
i-norden reviewed 2023-03-07 18:25:21 +00:00
dboreham reviewed 2023-03-08 23:18:23 +00:00
telackey reviewed 2023-03-09 04:38:24 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#328
No description provided.