You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ ZSON is a PostgreSQL extension for transparent JSONB compression. Compression is
6
6
7
7
ZSON was originally created in 2016 by[Postgres Professional](https://postgrespro.ru/) team: researched and coded by[Aleksander Alekseev](http://eax.me/); ideas, code review, testing, etc by[Alexander Korotkov](http://akorotkov.github.io/) and[Teodor Sigaev](http://www.sigaev.ru/).
8
8
9
+
See also[discussion on Reddit](https://www.reddit.com/r/PostgreSQL/comments/55mr4r/zson_postgresql_extension_for_transparent_jsonb/).
10
+
9
11
##Install
10
12
11
13
Build and install ZSON:
@@ -121,6 +123,20 @@ delete from zson_dict where dict_id = 0;
121
123
122
124
In general it's safer to keep old dictionaries just in case. A few KB of disk space don't worth the risk of losing data.
123
125
126
+
##When it's a time to re-learn?
127
+
128
+
Unfortunately, it's hard to recommend a general approach.
129
+
130
+
A good heuristic could be:
131
+
132
+
```
133
+
select pg_table_size('tt') / (select count(*) from tt)
134
+
```
135
+
136
+
... i.e. average document size. When it suddenly starts to grow it's time to re-learn.
137
+
138
+
However, developers usually know when they change a schema significantly. It's also easy to re-check whether current schema differs a lot from the original using zson_dict table.
139
+
124
140
##Benchmark
125
141
126
142
**Disclaimer**: Synthetic benchmarks could not be trusted. Re-check everything on specific hardware, configuration, data and workload!