-
Notifications
You must be signed in to change notification settings - Fork 128
Update for jsonb compression #4566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
atovpeko
merged 15 commits into
latest
from
3138-feedback-page-use-timescalelatestcompressioncompression-methods
Nov 18, 2025
Merged
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e258937
update for jsonb compression
atovpeko 7d2480d
Merge branch 'latest' into 3138-feedback-page-use-timescalelatestcomp…
billy-the-fish 8fcf9ea
Merge branch 'latest' into 3138-feedback-page-use-timescalelatestcomp…
billy-the-fish 4b38ee6
Update use-timescale/hypercore/compression-methods.md
atovpeko 3066024
Update use-timescale/hypercore/compression-methods.md
atovpeko 8bad7e5
Update use-timescale/hypercore/compression-methods.md
atovpeko 2ea9213
Update use-timescale/hypercore/compression-methods.md
atovpeko b2bc3af
Update use-timescale/hypercore/compression-methods.md
atovpeko 6547d6a
Update use-timescale/hypercore/compression-methods.md
atovpeko 0ff5c47
Update use-timescale/hypercore/compression-methods.md
atovpeko cbf2106
Update use-timescale/hypercore/compression-methods.md
atovpeko 12efab9
update on review
atovpeko 9cda77e
Apply suggestion from @billy-the-fish
billy-the-fish 83bc942
Merge branch 'latest' into 3138-feedback-page-use-timescalelatestcomp…
billy-the-fish c8e5e43
Merge branch 'latest' into 3138-feedback-page-use-timescalelatestcomp…
atovpeko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -279,6 +279,32 @@ have a lot of repeated values, then the dictionary is the same size as the | |||||
| original data. TimescaleDB automatically detects this case, and falls back to | ||||||
| not using a dictionary in that scenario. | ||||||
|
|
||||||
| #### JSONB compression | ||||||
|
|
||||||
| For JSONB columns, TimescaleDB uses a two-layer compression approach: | ||||||
|
|
||||||
| 1. **TimescaleDB dictionary compression**: First, TimescaleDB attempts to apply | ||||||
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| its own dictionary compression to the JSONB data. This works well when JSONB | ||||||
| values have high repetition. | ||||||
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| 2. **PostgreSQL TOAST compression**: If dictionary compression doesn't perform | ||||||
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| well (for example, when each JSONB value is unique or nearly unique), | ||||||
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| TimescaleDB skips compression and allows PostgreSQL to handle the data using | ||||||
|
||||||
| TimescaleDB skips compression and allows PostgreSQL to handle the data using | |
| $PG to handle the data using |
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
billy-the-fish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
atovpeko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.