Photon accelerated updates

Important

Support for Photon accelerated updates is in Public Preview in Databricks Runtime 12.2 LTS and above.

Photon leverages deletion vectors to accelerate updates by reducing the frequency of full file rewrites during data modification on Delta tables. Photon optimizes DELETE, MERGE, and UPDATE operations. See What are deletion vectors?.

Rather than rewriting all records in a data file when any record is updated or deleted, Photon uses deletion vectors to indicate records have been removed from the target data files. Supplemental data files are used to indicate updates.

Subsequent reads on the table resolve current table state by applying the noted changes to the most recent table version.

Note

All clients that support reading deletion vectors can read Photon updates. See How does Azure Databricks manage Delta Lake feature compatibility?.

Enable Photon accelerated updates

When you use compute with Photon enabled, accelerated updates are used automatically for all tables that have deletion vectors enabled.

You enable support for deletion vectors on a Delta Lake table by setting a Delta Lake table property:

ALTER TABLE <table-name> SET TBLPROPERTIES ('delta.enableDeletionVectors' = true);

Warning

When you enable deletion vectors, the table protocol version is upgraded. Table protocol version upgrades are not reversible. After upgrading, the table will not be readable by Delta Lake clients that do not support deletion vectors. See How does Azure Databricks manage Delta Lake feature compatibility?.

Limitations

Photon accelerated updates share all limitations with deletion vectors. See Limitations.