Optimize noop upsert and other writes on reference tables
Open
performance
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
We currently always do a 2PC for INSERT INTO reference_table .. ON CONFLICT DO NOTHING, but we could check whether the local replica contains the value and if so avoid doing additional work.
A similar approach could work for UPDATE/DELETE, which may noop if no rows match the WHERE clause.
This would be particularly useful for workloads that try to normalize data on-the-fly by upserting e.g. a large text field into a reference table and storing an ID instead. If the same values recur frequently, the majority of transactions will be fast / single round trip.
Contributor guide
Assessment
This issue has not been assessed yet.