Skip to content

Commit

Permalink
update docs usage/managing-tables section on optimizing tables
Browse files Browse the repository at this point in the history
  • Loading branch information
VillePuuska authored and rtyler committed Sep 21, 2024
1 parent c123129 commit 98a64a1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/usage/managing-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@ Use `DeltaTable.vacuum` to perform the vacuum operation. Note that to prevent ac

## Optimizing tables

Optimizing tables is not currently supported.
Optimizing a table compacts small files into larger files to avoid the small file problem. This is especially important for tables that get small amounts of data appended to with high frequency. In addition to compacting small files, you can colocate similar data in the same files with Z Ordering, which allows for better file skipping and faster queries.

A table `dt = DeltaTable(...)` has two methods for optimizing it:

- `dt.optimize.compact()` for compacting small files,
- `dt.optimize.z_order()` to compact and apply Z Ordering.

See the section [Small file compaction](./optimize/small-file-compaction-with-optimize.md) for more information and a detailed example on `compact`, and the section [Z Order](./optimize/delta-lake-z-order.md) for more information on `z_order`.

0 comments on commit 98a64a1

Please sign in to comment.