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 II

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
Contributor


`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.

 

Yogesh Verma

View solution in original post

1 REPLY 1

Yogesh_378691
Contributor


`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.

 

Yogesh Verma