1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
# name: test/sql/storage/compression/zstd/fetch_row.test
# group: [zstd]
statement ok
SET storage_compatibility_version='v1.2.0'
# load the DB from disk
load __TEST_DIR__/test_zstd_compression_fetch_row.db
statement ok
CREATE TABLE big_string (
a VARCHAR,
id INT
);
statement ok
pragma force_compression='zstd'
statement ok
INSERT INTO big_string values (repeat('a', 8000), 1);
INSERT INTO big_string values (repeat('b', 10), 2);
INSERT INTO big_string values (repeat('c', 8000), 3);
INSERT INTO big_string values (repeat('d', 10), 4);
INSERT INTO big_string values (repeat('a', 8000), 1);
INSERT INTO big_string values (repeat('b', 10), 2);
INSERT INTO big_string values (repeat('c', 8000), 3);
INSERT INTO big_string values (repeat('d', 10), 4);
INSERT INTO big_string values (repeat('a', 8000), 1);
INSERT INTO big_string values (repeat('b', 10), 2);
INSERT INTO big_string values (repeat('c', 8000), 3);
INSERT INTO big_string values (repeat('d', 10), 4);
# Test with a string that is larger than a block size after compression
# uncompressed size: 3888890 compressed size: 1068813
statement ok
INSERT INTO big_string values (concat(range(0,500000)::VARCHAR), 5);
statement ok
INSERT INTO big_string values (repeat('f', 1), 6);
INSERT INTO big_string values (repeat('g', 8000), 7);
INSERT INTO big_string values (repeat('h', 10000), 8);
statement ok
checkpoint
restart
query II
SELECT a[1], strlen(a) from big_string;
----
a 8000
b 10
c 8000
d 10
a 8000
b 10
c 8000
d 10
a 8000
b 10
c 8000
d 10
[ 3888890
f 1
g 8000
h 10000
|