提交 eed8dbc3 编写于 作者: 一位用户's avatar 一位用户 🎨 提交者: mergify[bot]

docs(Limit): update the docs of Limits

上级 240702e2
......@@ -4,47 +4,49 @@ sidebar_position: 1.3
---
# Limits
Developed based on MySQL, StoneDB is compatible with the MySQL 5.6 and 5.7 protocols, and the ecosystem, common features, and common syntaxes of MySQL. However, due to characteristics of column-based storage, StoneDB is incompatible with certain MySQL operations and features.
Developed based on MySQL, StoneDB is compatible with the MySQL 5.6 and 5.7 protocols, and the ecosystem, common features, and common syntaxes of MySQL. However, due to characteristics of StoneDB, the following MySQL operations and features are not supported.
# Unsupported DDL operations
StoneDB does not support the following DDL operations:
- Modify the data type of a field.
- Modify the length of a field.
- Change the character set of a table or a field.
- Convert the character set for a table.
- Optimize a table.
- Analyze a table.
- Lock a table.
- Repair a table.
- Unlock tables.
- Execute a `CREATE TABLE … AS SELECT` statement.
- Reorganize a table.
- Rename a field.
- Configure the default value for a field.
- Specify the default value of a field to null.
- Specify the default value of a field to non-null.
- Add a unique constraint.
- Delete a unique constraint.
- Add a primary key constraint.
- Delete a primary key constraint.
- Create an index.
- Remove an index.
- Drop an index.
- Modify a table comment.
The table attributes and column attributes are difficult to modify. The character sets, data types, constraints, and indexes must be properly defined when tables are being created.
The table attributes and column attributes are difficult to modify. Therefore, the character sets, data types, constraints, and indexes must be properly defined when tables are being created.
# Unsupported DML operations
StoneDB does not support the following DML operations:
- Execute a `DELETE` statement.
- Use subqueries in an `UPDATE` statement.
- Execute an `UPDATE … JOIN` statement to update multiple tables.
- Execute a `REPLACE … INTO` statement.
StoneDB is not suitable for applications that are frequently updated. It supports only single-table update and insert operations. This is because a column-oriented database needs to find each corresponding column and update the value in the row when processing an update operation. However, a row-oriented database stores data by row. When processing an update operation, the row-oriented database only needs to find the corresponding page or block and update the data directly in the row.
- Execute an `UPDATE ... JOIN` statement to update multiple tables.
- Execute a `REPLACE ... INTO` statement.
:::info
For a `REPLACE ... INTO` statement that is used to insert one row, it can be executed only when no primary key or unique constraint conflict exists.
:::
StoneDB is not suitable for applications that are frequently updated. It supports only single-table update and insert operations. This is because a column-oriented store needs to find each corresponding column and update the value in the row when processing an update operation. However, a row-oriented store organizes data by row. When processing an update operation, the row-oriented store only needs to find the corresponding page or block and update the data directly in the row.
# Joins across storage engines not supported
By default, StoneDB does not support joins across storage engines. If a join involves tables in both other storage engines and StoneDB, an error will be reported. You can set the **tianmu_ini_allowmysqlquerypath** parameter to **1** in the **my.cnf** configuration file to remove this limit.
# Unsupported objects
StoneDB does not support the following objects:
- Global indexes
- Unique constraints
- Triggers
- Temporary tables
- Stored procedures containing dynamic SQL statements
- User-defined functions containing nested SQL statements
# Unsupported data types
......@@ -56,15 +58,6 @@ StoneDB does not support the following data types:
- json
- decimal whose precision is higher than 18, for example, decimal(19,x)
- Data types that contain keyword **unsigned** or **zerofill**
# Unsupported binary log formats
StoneDB does not support the following binary log formats:
- row
- mixed
Column-based storage engines support only statement-based binary logs. Row-based binary logs and mixed binary logs are not supported.
# Join queries across storage engines not supported
By default, StoneDB does not support join queries across storage engines. If a join query involves tables in both other storage engines and StoneDB, an error will be reported. You can set the **tianmu_ini_allowmysqlquerypath** parameter to **1 **in the **my.cnf** configuration file to remove this limit.
# Transactions not supported
Transactions must strictly comply with the ACID attributes. However, StoneDB does not support redo and undo logs and thus does not support transactions.
# Partitions not supported
......
......@@ -5,59 +5,57 @@ sidebar_position: 1.3
# 使用限制
StoneDB 100% 兼容 MySQL 5.6、5.7 协议和 MySQL 生态等重要特性,支持 MySQL 常用的功能及语法,但由于 StoneDB 本身的一些特性,部分操作和功能尚未得到支持,以下列出的是不兼容 MySQL 的操作和功能。
## 不支持的 DDL
1. 修改字段的数据类型
2. 修改字段的长度
3. 修改表/字段的字符集
4. 转换表的字符集
5. optimize table
6. analyze table
7. lock table
8. repair table
9. CTAS
10. 重组表
11. 重命名字段
12. 设置字段的默认值
13. 设置字段为空
14. 设置字段非空
15. 添加唯一约束
16. 删除唯一约束
# 不支持的 DDL
1. 修改表/字段的字符集
2. 转换表的字符集
3. optimize table
4. nalyze table
5. lock table
6. repair table
7. unlock tables
8. CTAS
9. 重命名字段
10. 设置字段的默认值
11. 设置字段为空
12. 设置字段非空
13. 添加唯一约束
14. 删除唯一约束
15. 添加主键约束
16. 删除主键约束
17. 创建索引
18. 删除索引
19. 表修改注释
表和列的相关属性不易被修改,在表设计阶段尽可能定义好字符集、数据类型、约束和索引等。
## 不支持的 DML
1. delete
2. update 关联子查询
3. update 多表关联
4. replace into
# 不支持的 DML
1. update 关联子查询
2. update 多表关联
3. replace into
:::tips
StoneDB 不适用于有频繁的更新操作,因为对列式存储来说,更新需要找到对应的每一列,然后分多次更新,而行式存储由于一行紧挨着一行,找到对应的 page 或者 block 就可直接在行上更新,因此 StoneDB 只支持了常规用的单表 update 和 insert。
## 不支持跨存储引擎关联查询
如果 replace into 没有主键或者唯一约束冲突,语义逻辑是插入一行,这是支持的;如果 replace into 有主键或者唯一约束冲突,语义逻辑是更新一行,这是不支持的。<br />StoneDB 不适用于有频繁的更新操作,因为对列式存储来说,更新需要找到对应的每一列,然后分多次更新,而行式存储由于一行紧挨着一行,找到对应的 page 或者 block 就可直接在行上更新,因此 StoneDB 只支持了常规用的单表 update 和 insert。
:::
# 不支持跨存储引擎关联查询
StoneDB 默认不支持跨存储引擎关联查询,也就是说其他存储引擎下的表和 StoneDB 下的表进行关联查询会报错。可在参数文件 my.cnf 里定义 tianmu_ini_allowmysqlquerypath=1,这样就支持跨存储引擎表之间的关联查询了。
## 不支持的对象
# 不支持的对象
1. 全文索引
2. 唯一约束
3. 触发器
4. 临时表
5. 含有自定义函数的存储过程
6. 含有 SQL 的自定义函数
## 不支持的数据类型
4. 含有自定义函数的存储过程
5. 含有 SQL 的自定义函数
# 不支持的数据类型
1. 位类型 bit
2. 枚举型 enum
3. 集合型 set
4. json 类型
5. decimal 精度必须小于或等于18,否则不支持,如 decimal(19,x)
6. 创建表时不支持使用关键字 unsigned、zerofill
## 不支持事务
# 不支持事务
只有严格遵守 ACID 四大属性,才能真正的支持事务。而 StoneDB 由于没有 redo 和 undo,是不支持事务的。
## 不支持分区
# 不支持分区
列式存储不支持分区。
## 不支持行锁、表锁
# 不支持行锁、表锁
列式存储不支持行锁、表锁。
## 只支持 statement 的 binlog 格式
列式存储不支持 row、mixed 格式的 binlog。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册