cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

If we do z-order on a particular column will delta log stats collection be affected?

shubhadip
New Contributor

Let's assume a table contains more than 40 columns, now we know it automatically collects stat for the first 32 columns. If we run a z-order on a particular column(let's say column 1), then will the log file collect stats for all the 32 columns or will the log file collect stats for only 1st column w.r.t every file in the directory 

1 REPLY 1

Anonymous
Not applicable

@Shubhadip Ghosh​ : Hope this helps.

 In Delta Lake, when you perform Z-Ordering on a particular column, it reorganizes the data within the files based on the values of that column. However, Z-Ordering itself does not directly affect the statistics collection process for other columns in the table.

By default, Delta Lake automatically collects statistics for the first 32 columns of a table to improve query performance. These statistics are stored in the Delta transaction log.

When you run Z-Ordering on a specific column, it reorganizes the data within the files according to that column's values, but it doesn't trigger automatic statistics collection for the other columns. The statistics collection remains unaffected by the Z-Ordering operation.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group