v.25.10Improvement

Added a setting inject_random_order_for_select_without_order_by

Added a setting inject_random_order_for_select_without_order_by which injects ORDER BY rand() into top-level SELECT queries without ORDER BY clause. #87261 (Rui Zhang).
Added a new setting inject_random_order_for_select_without_order_by that automatically injects ORDER BY rand() into top-level SELECT queries which do not have an ORDER BY clause.

Why it matters

This feature provides a way to randomize the order of rows returned by SELECT queries that do not explicitly specify an ORDER BY. It is useful for users who want to introduce randomness in query results without manually adding ORDER BY rand() to each query.

How to use it

To enable this feature, set the inject_random_order_for_select_without_order_by setting to 1 or true in your query settings or server configuration. Once enabled, any top-level SELECT statements without an ORDER BY clause will automatically have ORDER BY rand() injected.