should be it
This commit is contained in:
53
external/duckdb/test/sql/storage/overflow_strings/load_overflow_strings_slowly.test_slow
vendored
Normal file
53
external/duckdb/test/sql/storage/overflow_strings/load_overflow_strings_slowly.test_slow
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# name: test/sql/storage/overflow_strings/load_overflow_strings_slowly.test_slow
|
||||
# description: Test loading overflow strings in small batches
|
||||
# group: [overflow_strings]
|
||||
|
||||
load __TEST_DIR__/overflow_strings.db
|
||||
|
||||
loop x 0 10
|
||||
|
||||
statement ok
|
||||
CREATE TABLE strings(s VARCHAR);
|
||||
|
||||
statement ok
|
||||
pragma force_compression='uncompressed'
|
||||
|
||||
# load large strings into the table iteratively
|
||||
loop it 0 10
|
||||
|
||||
statement ok
|
||||
INSERT INTO strings
|
||||
SELECT
|
||||
repeat(
|
||||
'X',
|
||||
CASE WHEN i % 17 = 0
|
||||
THEN 5000
|
||||
ELSE i % 7
|
||||
END
|
||||
) AS s
|
||||
FROM generate_series(0, 2500) tbl(i);
|
||||
|
||||
statement ok
|
||||
CHECKPOINT;
|
||||
|
||||
endloop
|
||||
|
||||
# And verify that no other compression is used
|
||||
query I
|
||||
SELECT compression FROM pragma_storage_info('strings') WHERE segment_type == 'VARCHAR' AND compression != 'Uncompressed';
|
||||
----
|
||||
|
||||
query I
|
||||
SELECT EXISTS (SELECT * FROM pragma_storage_info('strings') WHERE contains(segment_info, 'Overflow String'));
|
||||
----
|
||||
true
|
||||
|
||||
# ensure that the expected total storage size is the same as in the first iteration of the loop
|
||||
|
||||
query I nosort expected_blocks
|
||||
SELECT total_blocks FROM pragma_database_size();
|
||||
|
||||
statement ok
|
||||
DROP TABLE strings;
|
||||
|
||||
endloop
|
||||
Reference in New Issue
Block a user