Add option to use prepared statements for SQLite PutMany

This commit is contained in:
Daniel 2025-03-17 14:13:53 +01:00
parent 2c8ab54104
commit 9b12dfffc2
3 changed files with 216 additions and 0 deletions

View file

@ -205,6 +205,11 @@ func (db *SQLite) PutMany(shadowDelete bool) (chan<- record.Record, <-chan error
db.wg.Add(1)
defer db.wg.Done()
// Check if we should use prepared statement optimized inserting.
if UsePreparedStatements {
return db.putManyWithPreparedStmts(shadowDelete)
}
batch := make(chan record.Record, 100)
errs := make(chan error, 1)