ClickHouse/tests/queries/0_stateless/01079_order_by_pk.sql

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

8 lines
318 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS mt_pk;
2023-08-12 17:36:57 +00:00
CREATE TABLE mt_pk ENGINE = MergeTree PARTITION BY d ORDER BY x SETTINGS index_granularity = 8192, index_granularity_bytes = '10Mi'
AS SELECT toDate(number % 32) AS d, number AS x FROM system.numbers LIMIT 10000010;
SELECT x FROM mt_pk ORDER BY x ASC LIMIT 10000000, 1;
DROP TABLE mt_pk;