forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: introduce tableWriter abstraction
Migrates the client.Batch ownership for INSERT/UPDATE/DELETE to a new tableWriter interface, the methods of which parallel the TableReader interface being added in cockroachdb#6368. In preparation for UPSERT, which has more complicated batch usage than the previous three cases. name old time/op new time/op delta Insert1000_Cockroach-8 19.5ms ± 3% 19.8ms ± 6% ~ (p=0.690 n=5+5) Update1000_Cockroach-8 43.4ms ± 3% 43.5ms ± 6% ~ (p=0.841 n=5+5) Delete1000_Cockroach-8 65.1ms ± 2% 64.9ms ± 6% ~ (p=1.000 n=5+5) Scan1000_Cockroach-8 2.24ms ± 4% 2.15ms ± 2% -3.97% (p=0.016 n=5+5) TrackChoices1000_Cockroach-8 153µs ± 6% 148µs ± 4% ~ (p=0.222 n=5+5) name old alloc/op new alloc/op delta Insert1000_Cockroach-8 3.66MB ± 1% 3.64MB ± 1% ~ (p=0.095 n=5+5) Update1000_Cockroach-8 6.23MB ± 1% 6.21MB ± 0% ~ (p=0.548 n=5+5) Delete1000_Cockroach-8 2.68MB ± 0% 2.68MB ± 0% ~ (p=0.413 n=5+4) Scan1000_Cockroach-8 313kB ± 0% 313kB ± 0% ~ (p=1.000 n=5+5) TrackChoices1000_Cockroach-8 23.2kB ± 4% 23.7kB ± 6% ~ (p=0.317 n=5+5) name old allocs/op new allocs/op delta Insert1000_Cockroach-8 25.6k ± 1% 25.5k ± 1% ~ (p=0.095 n=5+5) Update1000_Cockroach-8 41.5k ± 0% 41.4k ± 0% ~ (p=0.206 n=5+5) Delete1000_Cockroach-8 16.7k ± 0% 16.7k ± 0% ~ (p=0.548 n=5+5) Scan1000_Cockroach-8 2.29k ± 0% 2.29k ± 0% ~ (all samples are equal) TrackChoices1000_Cockroach-8 115 ± 2% 116 ± 2% ~ (p=0.429 n=5+5) (The Scan1000 movement is noise.)
- Loading branch information
Showing
5 changed files
with
314 additions
and
180 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
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
Oops, something went wrong.