Skip to content

Commit 31f6bc8

Browse files
authored
Merge pull request #184 from oceanbase/xiaofeng_branch
根据用户反馈,在进阶教程的《数据库开发规范》章节中补充一些内容
2 parents 5cf7abe + 623f27c commit 31f6bc8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/user_manual/operation_and_maintenance/development_specification/03_sql_specification.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ weight: 3
3737

3838
- 不推荐使用非同类型的列进行比较或 join,可能会因为出现隐式类型转换而导致无法利用索引的问题。如无法避免,尽量通过 cast 或者 convert 等方式进行必要的显式类型转换。
3939

40+
- 不推荐使用 `where (c1, c2) = ('abc', 'def')` 这种写法。首先这不是标准 SQL 的写法,只在部分数据库中支持,可移植性差。其次即使被部分数据库支持,一般也无法利用索引,也无法利用各种优化,导致查询效率大幅降低。建议把上述过滤条件改写为:`where c1 = 'abc' and c2 = 'def' `
41+
4042
- 在设置并行度的时候,最佳并行度为表的分片数,次佳并行度为使用 auto dop 自动生产的并行度。
4143

4244
- 不推荐读锁 `SELECT ... for update (with cs)`。如果事务较大,高并发下容易导致锁等待影响业务。

0 commit comments

Comments
 (0)