Skip to content

Commit

Permalink
sys var: add more contents to tidb_remove_orderby_in_subquery (#18323)
Browse files Browse the repository at this point in the history
  • Loading branch information
hfxsd committed Aug 8, 2024
1 parent 730123a commit 2fe837b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4359,6 +4359,8 @@ EXPLAIN FORMAT='brief' SELECT COUNT(1) FROM t WHERE a = 1 AND b IS NOT NULL;
- 类型:布尔型
- 默认值:在 v7.2.0 之前版本中为 `OFF`,在 v7.2.0 及之后版本中为 `ON`
- 指定是否在子查询中移除 `ORDER BY` 子句。
- 在 ISO/IEC SQL 标准中,`ORDER BY` 主要用于对顶层查询结果进行排序。对于子查询中的 `ORDER BY`,SQL 标准并不要求子查询结果按 `ORDER BY` 排序。
- 如果需要对子查询结果排序,通常可以在外层查询中处理,例如使用窗口函数或在外层查询中再次使用 `ORDER BY`。这样做可以确保最终结果集的顺序。

### `tidb_replica_read` <span class="version-mark">从 v4.0 版本开始引入</span>

Expand Down

0 comments on commit 2fe837b

Please sign in to comment.