-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: ON CONFLICT DO UPDATE form of upsert #6591
Conversation
Great stuff Dan! Some initial comments
|
Nice! Reviewed
|
Review status: 1 of 13 files reviewed at latest revision, 10 unresolved discussions, some commit checks pending. sql/select_qvalue.go, line 77 [r1] (raw file):
|
Reviewed 3 of 13 files at r1, 7 of 11 files at r2. Comments from Reviewable |
sql/select_qvalue.go, line 267 [r1] (raw file):
|
Review status: 8 of 13 files reviewed at latest revision, 5 unresolved discussions, all commit checks successful. sql/select_qvalue.go, line 76 [r2] (raw file):
sql/select_qvalue.go, line 77 [r2] (raw file):
If we remove this check, we would detect the ambiguous table thing without having to actually check for it (in sql/tablewriter.go, line 326 [r1] (raw file):
|
Feel free to ignore the nits.
|
Review status: 5 of 13 files reviewed at latest revision, 12 unresolved discussions, all commit checks successful. sql/select_qvalue.go, line 267 [r1] (raw file):
|
Reviewed 1 of 7 files at r3. sql/select_qvalue.go, line 258 [r3] (raw file):
It would be great if we could compare Comments from Reviewable |
name old time/op new time/op delta Upsert1_Cockroach-8 1.15ms ± 5% 1.18ms ± 1% ~ (p=0.151 n=5+5) Upsert10_Cockroach-8 1.71ms ± 1% 1.75ms ± 1% +2.26% (p=0.008 n=5+5) Upsert100_Cockroach-8 7.31ms ± 1% 7.41ms ± 2% ~ (p=0.056 n=5+5) Upsert1000_Cockroach-8 74.2ms ± 4% 74.2ms ± 3% ~ (p=1.000 n=5+5) name old alloc/op new alloc/op delta Upsert1_Cockroach-8 82.4kB ± 0% 86.7kB ± 0% +5.11% (p=0.008 n=5+5) Upsert10_Cockroach-8 164kB ± 0% 168kB ± 0% +2.45% (p=0.008 n=5+5) Upsert100_Cockroach-8 1.05MB ± 0% 1.06MB ± 0% +0.89% (p=0.008 n=5+5) Upsert1000_Cockroach-8 9.19MB ± 0% 9.27MB ± 0% +0.90% (p=0.008 n=5+5) name old allocs/op new allocs/op delta Upsert1_Cockroach-8 1.09k ± 0% 1.17k ± 0% +7.40% (p=0.008 n=5+5) Upsert10_Cockroach-8 1.60k ± 0% 1.69k ± 0% +5.58% (p=0.008 n=5+5) Upsert100_Cockroach-8 7.05k ± 0% 7.32k ± 0% +3.87% (p=0.008 n=5+5) Upsert1000_Cockroach-8 60.9k ± 0% 63.0k ± 0% +3.39% (p=0.008 n=5+5) The benchmarks will get better once I do the "all Puts" optimization, which is coming next. Closes cockroachdb#1962.
Review status: 4 of 13 files reviewed at latest revision, 3 unresolved discussions, some commit checks pending. sql/select_qvalue.go, line 258 [r3] (raw file):
|
Awesome! Thanks for the updates!
|
Thanks for the review! |
Docs updated with cockroachdb/docs#308 |
The benchmarks will get better once I do the "all Puts" optimization, which is
coming next.
Closes #1962.
Followups:
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)