Files
datastore/tests/performance/reading_from_file.xml
Raúl MarínandClaude Opus 4.8 f0bf423bf9 Make reading_from_file perf test deterministic to reduce noise
The fill query `SELECT URL FROM test.hits LIMIT 100000` has no `ORDER BY`,
so with parts read by multiple threads the `LIMIT` returns a different
100000 rows on each server. Because `base58Encode` cost is super-linear in
string length, the two servers get persistently different workloads and the
comparison is frequently reported as `unstable`/`slower`/`faster`.

Add `ORDER BY URL` so both servers encode the same deterministic subset.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-01 18:58:14 +02:00

13 lines
794 B
XML

<test>
<!-- ORDER BY URL makes the selected subset deterministic. Without it, LIMIT returns a different 100000 rows on each
server (the read race between parts/threads decides which rows win), and since base58Encode cost is super-linear
in string length, the two servers get persistently different workloads and the comparison is reported as noisy. -->
<fill_query>INSERT INTO function file(reading_from_file.parquet) SELECT URL FROM test.hits ORDER BY URL LIMIT 100000 SETTINGS engine_file_truncate_on_insert=1</fill_query>
<query>SELECT sum(length(base58Encode(URL))) FROM file(reading_from_file.parquet) FORMAT Null</query>
<drop_query>INSERT INTO FUNCTION file(reading_from_file.parquet) SELECT * FROM numbers(0) SETTINGS engine_file_truncate_on_insert=1</drop_query>
</test>