File: zstd_store.benchmark

package info (click to toggle)
duckdb 1.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 299,196 kB
  • sloc: cpp: 865,414; ansic: 57,292; python: 18,871; sql: 12,663; lisp: 11,751; yacc: 7,412; lex: 1,682; sh: 747; makefile: 564
file content (24 lines) | stat: -rw-r--r-- 802 bytes parent folder | download | duplicates (4)
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;