Files
Alexandr Stelnykovych b56aba0c89 sqlite: write PutMany batches as multi-row upserts
modernc.org/sqlite re-parses the SQL text on every statement execution,
so the prepared statement in PutMany gave no benefit and parsing
accounted for about half of the time spent per record. Writing 50
records per INSERT ... ON CONFLICT DO UPDATE statement amortizes that
cost: the per-record time in BenchmarkPutManyPreparedStmt dropped from
roughly 100 µs to 50 µs on the same machine.

PutMany is used for the intel filter list import and for the resolver's
delayed cache flushes. Importing a filter list base update is now roughly
twice as fast on the database side.

Stored data is unchanged, including NULL format and value for records
without data. Duplicate keys within one statement resolve to the last
write, as before. A failed prepare now rolls the transaction back
instead of leaving it open.

The new test covers full and partial statements and re-writing existing
keys, for both the batched and the single-row PutMany path.
2026-10-19 16:46:04 +03:00
..
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2025-02-25 11:48:16 +01:00
2024-08-09 18:15:48 +03:00
2025-08-07 02:04:38 +03:00
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00