ClickHouse/tests/performance/insert_sparse_column.xml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
2.0 KiB
XML
Raw Normal View History

2024-09-21 13:43:12 +00:00
<test>
<create_query>CREATE TABLE t_insert_sparse (id UInt64, c0 String, c1 String, c2 String, c3 String, c4 String, c5 String, c6 String, c7 String, c8 String, c9 String, c10 String, c11 String, c12 String, c13 String, c14 String, c15 String, c16 String, c17 String, c18 String, c19 String, c20 String, c21 String, c22 String, c23 String, c24 String, c25 String, c26 String, c27 String, c28 String, c29 String, c30 String, c31 String, c32 String, c33 String, c34 String, c35 String, c36 String, c37 String, c38 String, c39 String, c40 String, c41 String, c42 String, c43 String, c44 String, c45 String, c46 String, c47 String, c48 String, c49 String, c50 String, c51 String, c52 String, c53 String, c54 String, c55 String, c56 String, c57 String, c58 String, c59 String, c60 String, c61 String, c62 String, c63 String, c64 String, c65 String, c66 String, c67 String, c68 String, c69 String, c70 String, c71 String, c72 String, c73 String, c74 String, c75 String, c76 String, c77 String, c78 String, c79 String, c80 String, c81 String, c82 String, c83 String, c84 String, c85 String, c86 String, c87 String, c88 String, c89 String, c90 String, c91 String, c92 String, c93 String, c94 String, c95 String, c96 String, c97 String, c98 String, c99 String) ENGINE = MergeTree ORDER BY id</create_query>
<!-- Prepare JSON data -->
<fill_query>SYSTEM STOP MERGES t_insert_sparse</fill_query>
<!-- Prepare JSON data -->
<fill_query>INSERT INTO FUNCTION file('test_data_sparse.json', LineAsString) SELECT format('{{ "id": {}, "c{}": "{}" }}', number, number % 50, hex(rand())) FROM numbers(100000) SETTINGS engine_file_truncate_on_insert = 1</fill_query>
<!-- Insert one batch to create statistics about serialization -->
<fill_query>INSERT INTO t_insert_sparse SELECT * FROM file('test_data_sparse.json', JSONEachRow)</fill_query>
<query>INSERT INTO t_insert_sparse SELECT * FROM file('test_data_sparse.json', JSONEachRow)</query>
<drop_query>DROP TABLE IF EXISTS test</drop_query>
</test>