Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slack-19.0: optimize sqlutils.ToSqlite3Dialect, part 2 #546

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

timvaillancourt
Copy link
Member

@timvaillancourt timvaillancourt commented Oct 29, 2024

Description

As a follow-up to upstreaming #545, I made a few more improvements to the optimisation. Now read queries bypass several regex filters and benchmark 19% better

See vitessio/vitess#17113 for a full explanation. This is a pre-backport of that PR, on top of the original POC

Before

goos: darwin
goarch: amd64
pkg: vitess.io/vitess/go/vt/external/golib/sqlutils
cpu: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
BenchmarkToSqlite3Dialect_Insert1000
BenchmarkToSqlite3Dialect_Insert1000-16    	       1	1870643229 ns/op
BenchmarkToSqlite3Dialect_Select
BenchmarkToSqlite3Dialect_Select-16        	    3541	    330667 ns/op
PASS
ok  	vitess.io/vitess/go/vt/external/golib/sqlutils	4.660s

After (8-9% improvement for writes, 19% reads)

goos: darwin
goarch: amd64
pkg: vitess.io/vitess/go/vt/external/golib/sqlutils
cpu: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
BenchmarkToSqlite3Dialect_Insert1000
BenchmarkToSqlite3Dialect_Insert1000-16    	       1	1711349181 ns/op
BenchmarkToSqlite3Dialect_Select
BenchmarkToSqlite3Dialect_Select-16        	    4436	    270223 ns/op
PASS
ok  	vitess.io/vitess/go/vt/external/golib/sqlutils	4.528s

Related Issue(s)

vitessio/vitess#17113

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on the CI
  • Documentation was added or is not required

Deployment Notes

Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
@timvaillancourt timvaillancourt requested a review from a team as a code owner October 29, 2024 20:20
@github-actions github-actions bot added this to the v19.0.5 milestone Oct 29, 2024
Signed-off-by: Tim Vaillancourt <[email protected]>
@timvaillancourt timvaillancourt merged commit a768745 into slack-19.0 Oct 29, 2024
161 of 163 checks passed
@timvaillancourt timvaillancourt deleted the optimize-ToSqlite3Dialect-pt2.slack-19.0 branch October 29, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants