1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
# name: benchmark/micro/compression/zstd/zstd_store.benchmark
# description: ZSTD decompression speed of relatively big (>= overflow string) strings
# group: [zstd]
name ZSTD Compression Write
group zstd
storage persistent v1.2.0
require_reinit
load
DROP TABLE IF EXISTS zstd_strings;
PRAGMA force_compression='zstd';
set variable my_string = (list_reduce([chr(((i % 26) + ord('a'))::INTEGER) for i in range(4096)], (x, y) -> concat(x, y)));
create table test_compression as select getvariable('my_string') as data from range(2_500_000) tbl(i);
checkpoint;
assert I
select DISTINCT compression from pragma_storage_info('test_compression') where segment_type in ('VARCHAR')
----
ZSTD
run
create table zstd_strings as select getvariable('my_string') as data from range(2_500_000) tbl(i);
checkpoint;
|