/plushcap/analysis/cockroach-labs/when-and-why-to-use-select-for-update-in-cockroachdb

When and Why to Use SELECT FOR UPDATE in CockroachDB

What's this blog post about?

CockroachDB has introduced SELECT FOR UPDATE to simplify handling of client-side transaction retry errors and improve performance. This feature allows applications to take explicit control of row-level locking on a per-statement basis, reducing the need for developers to implement retry-loops for contended transactions. Benchmarking with YCSB (Yahoo! Cloud Serving Benchmark) showed that enabling SELECT FOR UPDATE in CockroachDB 20.1 improved throughput, tail latency, and reduced the number of transaction retry errors compared to v19.2.

Company
Cockroach Labs

Date published
June 22, 2020

Author(s)
John Kendall

Word count
1077

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.