iCreatAI News
Skip to content
Databricks Blog·· 2 days agoAI score34

Declare and optimize with UNIQUE constraints on Databricks

Declare and optimize with UNIQUE constraints on Databricks

AI summary

Databricks introduces UNIQUE constraints in Public Preview for Unity Catalog Delta tables in Databricks SQL and Runtime 18.2+, allowing tables to record multiple uniqueness guarantees beyond a single non-nullable primary key, with nullable columns and foreign key references supported. Constraints are informational and unenforced by default; after validation, marking them RELY lets the query optimizer eliminate eligible joins and DISTINCT aggregations, with benchmarks showing 7.9x and 12.0x speedups on TPC-DS SF10000.

Source: Databricks Blog · databricks.com