Skip to content
All news
EngineeringDatabricks Blog·November 3, 2026·Yan Yan

Declare and optimize with UNIQUE constraints on Databricks

Summary

Databricks UNIQUE constraints let you declare multiple nullable or composite uniqueness guarantees beyond a table's single PRIMARY KEY and reference them from foreign keys. Once you've validated and continuously maintained these informational constraints, marking them RELY lets the optimizer eliminate redundant joins and DISTINCT aggregations, removing over 99.99% of shuffle and speeding up queries by up to 12× in 10 TB TPC-DS benchmarks.

Summary generated by brickster.ai. For the full article, follow the source link above.

More from Databricks Blog