Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions docs/src/main/sphinx/sql/alter-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,18 @@ per-connector basis.
You can use the `=>` operator for passing named parameter values.
The left side is the name of the parameter, the right side is the value being passed.

Collapse files in a table that are over 128 megabytes in size with the `optimize`
procedure from the [Hive](hive-alter-table-execute), [Delta
Lake](delta-lake-alter-table-execute) , and
[Iceberg](iceberg-alter-table-execute) connectors:

```
ALTER TABLE hive.schema.test_table EXECUTE optimize(file_size_threshold => '128MB')
Executable commands are contributed by connectors, such as the `optimize`
command provided by the [Hive](hive-alter-table-execute), [Delta
Lake](delta-lake-alter-table-execute), and
[Iceberg](iceberg-alter-table-execute) connectors. For example, a user observing
many small files in the storage of a table called `test_table` in the `test`
schema of the `example` catalog, can use the `optimize` command to merge all
files below the `file_size_threshold` value. The result is fewer, but larger
files, which typically results in higher query performance on the data in the
files:

```
ALTER TABLE example.test.test_table EXECUTE optimize(file_size_threshold => '16MB')
```

## Examples
Expand Down