This documentation is for an unreleased version of Apache Paimon. We recommend you use the latest stable version.
Query Performance #
Table Mode #
The table schema has the greatest impact on query performance. See Table Mode.
For Merge On Read table, the most important thing you should pay attention to is the number of buckets, which will limit the concurrency of reading data.
For MOW (Deletion Vectors) or COW table or Read Optimized table, There is no limit to the concurrency of reading data, and they can also utilize some filtering conditions for non-primary-key columns.
Data Skipping By Primary Key Filter #
For a regular bucketed table (For example, bucket = 5), the filtering conditions of the primary key will greatly accelerate queries and reduce the reading of a large number of files.
Data Skipping By File Index #
You can use file index to table with Deletion Vectors enabled, it filters files by index on the read side.
CREATE TABLE <PAIMON_TABLE> WITH (
'deletion-vectors' = 'true',
'file-index.bloom-filter.columns' = 'c1,c2',
'file-index.bloom-filter.c1.items' = '200'
);
Supported filter types:
Bloom Filter
:
file-index.bloom-filter.columns
: specify the columns that need bloom filter index.file-index.bloom-filter.<column_name>.fpp
to config false positive probability.file-index.bloom-filter.<column_name>.items
to config the expected distinct items in one data file.
Bitmap
:
file-index.bitmap.columns
: specify the columns that need bitmap index.
Bit-Slice Index Bitmap
file-index.bsi.columns
: specify the columns that need bsi index.
More filter types will be supported…
If you want to add file index to existing table, without any rewrite, you can use rewrite_file_index
procedure. Before
we use the procedure, you should config appropriate configurations in target table. You can use ALTER clause to config
file-index.<filter-type>.columns
to the table.
How to invoke: see flink procedures