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

I'm trying to understand if predicate pushdown is supported when using the DESCRIBE HISTORY command

saicharandeepb
New Contributor

I'm trying to understand if predicate pushdown is supported when using the DESCRIBE HISTORY command on a Delta table in Databricks.

1 ACCEPTED SOLUTION

Accepted Solutions

Yogesh_378691
New Contributor III


`DESCRIBE HISTORY` on a Delta table in Databricks does **not support predicate pushdown** in the same way as regular SQL queries on data tables.

This is because `DESCRIBE HISTORY` is a **metadata operation** that reads the Delta log files to return table version history. While you can apply filters like:

```sql
SELECT * FROM (DESCRIBE HISTORY delta.`/path/to/table`) WHERE userName = 'xyz'
```

the filter is applied **after** the metadata is retrieved โ€” not during the log scanning. So thereโ€™s **no performance gain** from the filter in terms of pushdown.

If you're dealing with a large number of table versions, it's better to use:

```sql
DESCRIBE HISTORY delta.`/path/to/table` LIMIT 10;
```

to limit how much history is read.

 

View solution in original post

1 REPLY 1

Yogesh_378691
New Contributor III


`DESCRIBE HISTORY` on a Delta table in Databricks does **not support predicate pushdown** in the same way as regular SQL queries on data tables.

This is because `DESCRIBE HISTORY` is a **metadata operation** that reads the Delta log files to return table version history. While you can apply filters like:

```sql
SELECT * FROM (DESCRIBE HISTORY delta.`/path/to/table`) WHERE userName = 'xyz'
```

the filter is applied **after** the metadata is retrieved โ€” not during the log scanning. So thereโ€™s **no performance gain** from the filter in terms of pushdown.

If you're dealing with a large number of table versions, it's better to use:

```sql
DESCRIBE HISTORY delta.`/path/to/table` LIMIT 10;
```

to limit how much history is read.

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now