
Author
Marcus Gartner
Marcus Gartner works on query optimization and execution at Cockroach Labs.
Read more articles from this author
Engineering
Performance Benefits of NOT NULL Constraints on Foreign Key Reference Columns
NOT NULL constraints are a ubiquitous tool for upholding data integrity. However, their performance benefits are less obvious. NOT NULL constraints provide a query optimizer with additional context that unlocks optimizations that significantly reduce query latency. In this post we’ll examine a few of these optimizations that transform query plans involving foreign key relationships.

Marcus Gartner
June 27, 2023
