Files
Knowledge/1 使用/数据库/数据库事务级别.md
T

33 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 隔离级别
READ UNCOMMITED(1)
READ COMMITED(2)
REPEATABLE READ(4)
SERIALIZABLE(8)
![[Pasted image 20240326150557.png]]
|隔离级别 \ 解决|脏读|不可重复读|幻读|
|---|---|---|---|
|未提交读|可能|可能|可能|
|已提交读|不可能|可能|可能|
|可重复读|不可能|不可能|可能|
|可串行化|不可能|不可能|不可能|
### 达梦与其他数据库隔离级别对比
| 隔离级别 \ 数据库 | 达梦 | Oracle | Postgresql | Mysql(InnoDB) |
| ---------- | ------ | ------ | ---------- | ------------- |
| 未提交读 | 支持 | 不支持 | 不支持 | 支持 |
| 已提交读 | 支持(默认) | 支持(默认) | 支持(默认) | 支持 |
| 可重复读 | 支持 | 支持 | 支持 | 支持(默认) |
| 可串行化 | 支持 | 支持 | 支持 | 支持 |
## 参考文档
- https://www.metisdata.io/blog/transaction-isolation-levels-and-why-we-should-care
- https://www.percona.com/blog/differences-between-read-committed-and-repeatable-read-transaction-isolation-levels/
- [[达梦数据库事务隔离级别介绍(https://blog.csdn.net/fd3200/article/details/115363097)]]