v.23.10New Feature
Introduce create_table_empty_primary_key_by_default setting for default ORDER BY ()
Introduce a settingcreate_table_empty_primary_key_by_defaultfor defaultORDER BY (). #55899 (Srikanth Chekuri).
Why it matters
This feature allows users to create tables without a primary key or sorting key by default, which can be useful for scenarios where sorting is unnecessary or to optimize write performance by avoiding sorting overhead.How to use it
Set thecreate_table_empty_primary_key_by_default setting to 1 to enable tables to be created with an empty ORDER BY clause by default. This can be done by adding the setting in the server configuration or specifying it in the session settings. For example:SET create_table_empty_primary_key_by_default = 1;
CREATE TABLE example_table (
id UInt32,
value String
) ENGINE = MergeTree();
-- This table will have ORDER BY () by default.