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:ย 

What is a Data Skipping in Delta Lake?

gowri_databrick
New Contributor II

Hi everyone,

Iโ€™m learning about Delta Lake performance and came across data skipping.

I understand that it can help Databricks avoid reading unnecessary data when running queries, but Iโ€™d like to understand its purpose more clearly.

For example, if an orders table contains millions of records and I query only orders from a particular date, how can data skipping help reduce the amount of data that needs to be read?

What is the main purpose of data skipping, and how does it help improve query performance?

Thanks!

3 REPLIES 3

balajij8
Esteemed Contributor II

@gowri_databrick Data skipping is a built in optimization that uses file-level statistics (minimum values, maximum values and null counts) to automatically skip reading data files that don't contain relevant data for your query. When you write data to a Delta table, Delta Lake automatically collects these statistics for each column in every data file. These statistics act as a smart index that helps Databricks determine which files need to be read and which can be safely ignored. In your orders table example, when you query for a specific date, engine checks the min/max date statistics for each file without opening them. If a file's date range doesn't overlap with the filter condition, that entire file is skipped - Databricks never reads it from storage. This dramatically reduces I/O, especially on large tables where the filter might eliminate large amount of the data. The performance improvement is automatic and requires no manual tuning, though you can enhance it further with other techniques to co locate related data in the same files. More details here

data_pulse
New Contributor II

@gowri_databrick 
This is a good concept to understand before going bit deeper into delta optimization.

Data skipping is delta lake optimization technique where the query engine uses file level statistics stored in delta transaction log to avoid reading files that doesn't contain data required by the query.

Whenever any data is written to delta table, it collects file level statistics such as min/max values, null counts, row counts etc. At query time these statistics are checked before the files are opened. 
Eg:
File 1: order_date Jan 1โ€“10
File 2: order_date Jan 11โ€“20
File 3: order_date Feb 01โ€“10

Query: 

SELECT * FROM orders WHERE order_date = '2026-02-03';

It can skip Files 1 and 2 entirely and read only File 3. That means less storage I/O, less decompression, less CPU usage, and faster query execution.

The effectiveness of data skipping also depends on how data is physically organized in the storage. If every file contains dates spanning the entire year, the min/max ranges overlap and very little can be skipped here.

That's why Databricks recommends Liquid Clustering (LC) for new tables. Clustering co-locates similar values, such as order_date or customer_id, into fewer files so that data-skipping statistics become more selective. Can find more insights into LC here.

For UC managed tables, predictive optimization can further help by automatically running operations such as OPTIMIZE and ANALYZE, collecting useful statistics and improving file layout over time. 
If required, can also explicitly choose columns for skipping statistics:

ALTER TABLE orders 
SET TBLPROPERTIES ( 'delta.dataSkippingStatsColumns' = 'order_date,customer_id' );

Then trigger re-computing of existing data with:
ANALYZE TABLE orders COMPUTE DELTA STATISTICS; 

To summarize:
Data skipping reduces the amount of data the query engine needs to read before normal row-level filtering even starts. So, the optimization flow looks like:
Good file layout / clustering โ†’ useful file-level statistics โ†’ more files skipped โ†’ less data scanned โ†’ faster queries with lower I/O and compute usage. More insights on Data skipping here

Coffee77
Honored Contributor III

I think the below picture will help a bit. Take a look at section 2 for "data skipping":

Coffee77_0-1788898751246.png

 


Lifelong Solution Architect Learner | Coffee & Data