mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
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]>
13 lines
794 B
XML
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>
|