We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7db59c2 + 8a14729 commit bdaa338Copy full SHA for bdaa338
sync/evm/evm_sync.go
@@ -93,7 +93,8 @@ func (o *TraceOperation) Exec(tx *gorm.DB) error {
93
for _, log := range o.logArr {
94
log.TxId = o.txArr[log.TxIndex].ID
95
}
96
- if err := tx.Create(&o.logArr).Error; err != nil {
+ batchSize := 1000
97
+ if err := tx.CreateInBatches(&o.logArr, batchSize).Error; err != nil {
98
return errors.Wrap(err, "create logs")
99
100
0 commit comments