Skip to content

Text index: compress on-disk posting lists by Delta + FastPFOR - #84435

Merged
rschu1ze merged 23 commits into
masterfrom
ahmadov/fst-posting-list-compression
Aug 12, 2025
Merged

rschu1ze merged 23 commits into
masterfrom
ahmadov/fst-posting-list-compression

Conversation

@ahmadov

@ahmadov ahmadov commented Jul 25, 2025 •

Copy link
Copy Markdown
Member

Previously, on-disk posting lists in the text index were stored as zstd-compressed Roaring bitmaps. Turns out that Delta + PFOR (Patched Frame Of Reference) achieves higher compression rates.

Delta + PFOR compression requires the FastPfor library. In case it is not present, it will fallback to the zstd-compressed Roaring bitmaps.

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Previously, zstd compression was used on top of the Roaring bitmap raw
data. This could lead to larger posting list data on disk.

With this PR, a more specific compression for the sorted integer
sequence has been implemented. Namely, Delta + PFOR (Patched Frame Of
Reference) is choosen. To achieve high performance, `FastPFOR` [[1]]
library has been introduced which uses SIMD intrinsics.

[1]: https://github.com/fast-pack/FastPFOR
@ahmadov
ahmadov force-pushed the ahmadov/fst-posting-list-compression branch from a853271 to 30d04b9 Compare July 25, 2025 09:30
Comment thread .gitmodules Resolved
Comment thread contrib/FastPFOR-cmake/CMakeLists.txt Resolved
Comment thread contrib/FastPFOR-cmake/CMakeLists.txt Resolved
@rschu1ze rschu1ze changed the title Text index: posting list compression Text index: compress on-disk posting lists by Delta + FastPFOR Jul 31, 2025
Comment thread src/Storages/MergeTree/GinIndexStore.h Resolved
@ahmadov
ahmadov marked this pull request as ready for review August 6, 2025 14:59
@clickhouse-gh

clickhouse-gh Bot commented Aug 6, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [0679597]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added pr-not-for-changelog This PR should not be mentioned in the changelog submodule changed At least one submodule changed in this PR. labels Aug 6, 2025
Comment thread src/Storages/MergeTree/GinIndexStore.h Resolved
Comment thread src/Storages/MergeTree/GinIndexStore.h Resolved
Comment thread src/Storages/MergeTree/GinIndexStore.h Resolved
Comment thread src/Storages/MergeTree/GinIndexStore.h Resolved
Comment thread src/Storages/MergeTree/GinIndexStore.h Resolved
Comment thread src/Storages/MergeTree/GinIndexStore.h Resolved
@rschu1ze

This comment was marked as resolved.

@rschu1ze

This comment was marked as resolved.

@ahmadov

This comment was marked as resolved.

@rschu1ze

This comment was marked as resolved.

@ahmadov

This comment was marked as resolved.

@rschu1ze
rschu1ze added this pull request to the merge queue Aug 12, 2025
Merged via the queue into master with commit 97be536 Aug 12, 2025
@rschu1ze
rschu1ze deleted the ahmadov/fst-posting-list-compression branch August 12, 2025 14:03
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 12, 2025
@rienath rienath mentioned this pull request Dec 12, 2025
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants