You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve Query performance and return an error if the query includes multiple statements
This commit changes Query to return an error if more than one SQL
statement is provided. Previously, this library would only execute the
last query statement. It also improves query construction performance by
~15%.
This is a breaking a change since existing programs may rely on the
broken mattn/go-sqlite3 implementation. That said, any program relying
on this is also broken / using sqlite3 incorrectly.
```
goos: darwin
goarch: arm64
pkg: github.com/charlievieth/go-sqlite3
cpu: Apple M4 Pro
│ x1.txt │ x2.txt │
│ sec/op │ sec/op vs base │
Suite/BenchmarkQuery-14 2.255µ ± 1% 1.837µ ± 1% -18.56% (p=0.000 n=10)
Suite/BenchmarkQuerySimple-14 1.322µ ± 9% 1.124µ ± 4% -15.02% (p=0.000 n=10)
geomean 1.727µ 1.436µ -16.81%
│ x1.txt │ x2.txt │
│ B/op │ B/op vs base │
Suite/BenchmarkQuery-14 664.0 ± 0% 656.0 ± 0% -1.20% (p=0.000 n=10)
Suite/BenchmarkQuerySimple-14 472.0 ± 0% 456.0 ± 0% -3.39% (p=0.000 n=10)
geomean 559.8 546.9 -2.30%
│ x1.txt │ x2.txt │
│ allocs/op │ allocs/op vs base │
Suite/BenchmarkQuery-14 23.00 ± 0% 22.00 ± 0% -4.35% (p=0.000 n=10)
Suite/BenchmarkQuerySimple-14 14.00 ± 0% 13.00 ± 0% -7.14% (p=0.000 n=10)
geomean 17.94 16.91 -5.76%
```
0 commit comments