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. Change-Id: Id7a56c18c0978470542135894a2f2bcf6f7c9dd1 Reviewed-on: https://go-review.googlesource.com/35266Reviewed-by: Russ Cox <rsc@golang.org>
Showing
Please register or sign in to comment