Skip to content

sql: foreign key checks should only scan the primary column family of a row #30852

@nvb

Description

@nvb

We currently scan all column families in the destination row when performing a foreign key check. We should limit this to the primary column family, which we know will never be missing as long as the row exists.

This has implications on transaction contention. For instance, see #30624.

cc. @knz for triage.

Metadata

Metadata

Assignees

Labels

A-sql-executionRelating to SQL execution.A-sql-fksA-sql-mutationsMutation statements: UPDATE/INSERT/UPSERT/DELETE.C-performancePerf of queries or internals. Solution not expected to change functional behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions