ORDER BY FALSE with table operators
Details
| Detail name | Value |
|---|---|
| Changelog Number | 27741 |
| Type | Improvement |
| Status | Resolved |
| Fix Versions | Exasol 2025.2.0, Exasol 2026.1.0 |
| Resolution Date | 2025-12-17 |
Background
ORDER BY FALSE enforces materialization of subselects, which is a common workaround for some known bugs in Exasol (example, example, example). However, in table operators (UNION, UNION ALL, INTERSECT, EXCEPT) having ORDER BY FALSE was not allowed, even though it could also be beneficial in some scenarios.
Example
-- Observed: Error: "order by object not found" -- Expected: Success select x from t1 union all select y from t2 order by false;
Improvement
ORDER BY FALSE is allowed with table operators. It does not affect query results but prevents certain optimizations.