sql/opt: implicit SFU locking on Update's row fetch disabled with locality-optimized search #92847
Labels
A-sql-optimizer
SQL logical planning and optimizations.
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
E-quick-win
Likely to be a quick win for someone experienced.
T-sql-queries
SQL Queries Team
Projects
Consider a YCSB usertable that's configured as
REGIONAL BY ROW
. An update statement on this table looks like:Today, this UPDATE has a plan that looks like:
Notice that the initial row fetch of the UPDATE uses locality-optimized search. That's good!
However, notice also that SFU locking is not pushed into the scans. That's because the pattern matching in
shouldApplyImplicitLockingToUpdateInput
which we use to power implicit SFU for UPDATES does not properly handle locality-optimized search. We should be pushing the SFU locking into each branch of the locality-optimized search.Jira issue: CRDB-22000
Epic CRDB-25322
The text was updated successfully, but these errors were encountered: