-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Query performance and return an error if the query includes m…
…ultiple 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% ```
- Loading branch information
1 parent
976152a
commit 8ba2e97
Showing
2 changed files
with
253 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters