Applies to VAST Cluster 5.5. Examples use the VAST DataBase Python SDK 2.1.0.
You don't choose how VAST DataBase compresses or encodes a table. There's no codec or encoding setting per column or per table: the cluster reduces table data the same way it reduces all the data it stores. This page explains what that means for you, what the compression settings in Trino and Spark do instead, and where to see how much space a table uses.
No compression setting on tables
In VAST Cluster 5.5, no option sets a compression codec or an encoding for a table or a column. Neither create_table() in the Python SDK nor the VAST CLI's table create has one, and there's no other. See the Python SDK reference and table create.
So there's nothing to tune per table. Choose the column types that fit your data, and leave compression to the cluster.
Data reduction applies to tables
Table data goes through the cluster's data reduction like any other data. As the cluster moves data from the write buffer to flash, it deduplicates it, then applies compression or similarity-based reduction, whichever reduces the data more (Data reduction; write path). How much it saves depends on your data.
Data reduction is set for the whole cluster, not per table or per database. Similarity-based reduction, for example, is turned on or off cluster-wide (Similarity-based data reduction). Only your platform team can change these settings.
Admin task: send to your platform team. See Data reduction and Similarity-based data reduction.
The compression option in Trino and Spark
The Trino and Spark connectors each have a compression option. It compresses query results on their way to the engine, using Zstandard. It doesn't change how the table is stored.
| Engine | Setting | Detail |
|---|---|---|
| Trino | compression=zstd in the catalog file, or the vast.compression session property for a catalog called vast |
Trino |
| Spark | spark.ndb.compression=zstd |
Spark |
| Python SDK | None. The SDK has no compression option for queries or inserts (SDK 2.1.0). |
See how much space a table uses
Your platform team can see capacity analytics for each database view in the VAST Web UI: usable and logical capacity, and data reduction (Monitoring VAST DataBases; Viewing capacity analytics).
From the Python SDK, table.get_stats().size_in_bytes reports a size for the table, and each projection's stats have one of their own (monitoring your workload). These docs don't say whether that size is before or after data reduction, so don't use it to work out a compression ratio.
Admin task: send to your platform team. Ask for the capacity analytics of your database view. See Viewing capacity analytics.
See also
- Write path: what happens to your rows after a commit.
- How tables are stored
- Data types