Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 84073bc

Browse files
author
Rinat Mukhtarov
committed
fibonacci_bytea fix table
1 parent 2e4d6e1 commit 84073bc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎experiments/delta_encode.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ with t (t) as (
4747
)
4848
select * from b;
4949

50-
select 'fib_bytea' as storage_type,
50+
select 'fibonacci_bytea' as storage_type,
5151
pg_column_size(a_fib) as orig_compressed_size,
5252
pg_column_size(ad_fib) as delta_compressed_size,
5353
pg_column_size(a_fib::text::bytea) as orig_uncompressed_size,
@@ -76,12 +76,12 @@ select 'jsonb_int_array',
7676
from test.delta;
7777
```
7878

79-
| storage\_type | orig\_compressed\_size | delta\_compressed\_size | orig\_uncompressed\_size | delta\_uncompressed\_size |
80-
|:---| :---| :---| :---| :---|
81-
| fib\_int\_array |887 | 773 | 887 | 773 |
82-
| pg\_int\_array |1392 | 1392 | 1396 | 1396 |
83-
| json\_int\_array |2376 | 1578 | 2679 | 1717 |
84-
| jsonb\_int\_array | 2130 | 2044 | 5490 | 4496 |
79+
| storage\_type | orig\_compressed\_size | delta\_compressed\_size | orig\_uncompressed\_size | delta\_uncompressed\_size |
80+
|:------------------|-----------------------:|------------------------:|-------------------------:|--------------------------:|
81+
| fibonacci\_bytea |887 | 773 | 887 | 773 |
82+
| pg\_int\_array |1392 | 1392 | 1396 | 1396 |
83+
| json\_int\_array |2376 | 1578 | 2679 | 1717 |
84+
| jsonb\_int\_array | 2130 | 2044 | 5490 | 4496 |
8585

8686
Отсортированный список чисел (например список идентификаторов) с дельта + Фибоначчи кодированием
8787
и хранением в `bytea` занимает почти 2 раза меньше места, чем в обычном массиве `int[]`.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /