Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion documentation/query/export-parquet.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,5 +211,5 @@ penalty of keeping pages that barely compress.
Individual columns can override the global encoding and compression settings.
See [CREATE TABLE - Per-column Parquet encoding and compression](/docs/query/sql/create-table/#per-column-parquet-encoding-and-compression)
for defining overrides at table creation, or
[ALTER TABLE ALTER COLUMN SET/DROP PARQUET](/docs/query/sql/alter-table-alter-column-parquet-encoding/)
[ALTER TABLE ALTER COLUMN SET PARQUET](/docs/query/sql/alter-table-alter-column-parquet-encoding/)
for modifying existing tables.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: ALTER TABLE ALTER COLUMN SET/DROP PARQUET
title: ALTER TABLE ALTER COLUMN SET PARQUET
sidebar_label: PARQUET ENCODING/COMPRESSION
description: ALTER TABLE ALTER COLUMN SET/DROP PARQUET SQL keyword reference documentation.
description: ALTER TABLE ALTER COLUMN SET PARQUET SQL keyword reference documentation.
---

Sets or removes per-column Parquet encoding and compression configuration on
Expand All @@ -27,12 +27,10 @@ ALTER TABLE sensors ALTER COLUMN temperature SET PARQUET(default, zstd(3));
ALTER TABLE sensors ALTER COLUMN temperature SET PARQUET(rle_dictionary, zstd(3));
```

## DROP

Reset per-column overrides back to the server defaults.

```questdb-sql title="Reset to defaults"
ALTER TABLE sensors ALTER COLUMN temperature DROP PARQUET;
ALTER TABLE sensors ALTER COLUMN temperature SET PARQUET(default);
```

## Supported encodings and codecs
Expand Down
22 changes: 11 additions & 11 deletions documentation/query/sql/create-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ the server-wide compression codec

#### Supported encodings

| Encoding | SQL keyword | Valid column types |
| ----------------------- | ------------------------- | ---------------------------- |
| Plain | `plain` | All |
| RLE Dictionary | `rle_dictionary` | All except BOOLEAN and ARRAY |
| Delta Length Byte Array | `delta_length_byte_array` | STRING, BINARY, VARCHAR |
| Delta Binary Packed | `delta_binary_packed` | INT, LONG, DATE, TIMESTAMP |
| Encoding | SQL keyword | Valid column types |
| ----------------------- | ------------------------- | ------------------------------------ |
| Plain | `plain` | All |
| RLE Dictionary | `rle_dictionary` | All except BOOLEAN, ARRAY AND STRING |
| Delta Length Byte Array | `delta_length_byte_array` | STRING, BINARY, VARCHAR |
| Delta Binary Packed | `delta_binary_packed` | INT, LONG, DATE, TIMESTAMP |

- **Plain** — stores values as-is with no transformation. Simplest encoding
with no overhead. Use as a fallback when data has high cardinality and no
Expand Down Expand Up @@ -452,7 +452,7 @@ For more details on Parquet compression, see the
[Apache Parquet compression documentation](https://parquet.apache.org/docs/file-format/data-pages/compression/).

To modify encoding or compression on existing tables, see
[ALTER TABLE ALTER COLUMN SET/DROP PARQUET](/docs/query/sql/alter-table-alter-column-parquet-encoding/).
[ALTER TABLE ALTER COLUMN SET PARQUET](/docs/query/sql/alter-table-alter-column-parquet-encoding/).

### Casting types

Expand Down Expand Up @@ -664,10 +664,10 @@ Checking the values per-table may be done using the `tables()` function:
SELECT id, table_name, maxUncommittedRows FROM tables();
```

| id | name | maxUncommittedRows |
| :-- | :----------- | :----------------- |
| 1 | trades | 250000 |
| 2 | sample_table | 50000 |
| id | name | maxUncommittedRows |
| :--- | :----------- | :----------------- |
| 1 | trades | 250000 |
| 2 | sample_table | 50000 |

## Table target volume

Expand Down
Loading