storage/db: batch INSERT statements across records
The MySQL protocol requires 1-3 synchronous round-trips for every
INSERT statement; to reduce the overhead, we now batch up 900 label
INSERT statments at a time. This makes a massive difference;
TestQuery previously ran in 108s; with this change, it now runs in 5s.
We were also affected by golang/go#15606; since we now generate a new INSERT
statement for every record, we are sidestepping that issue.
Reviewed-by: Russ Cox <email@example.com>
1 file changed