# Tidb Transaction Isolation Level

__*Transaction Isolation Level*__
__*READ COMMITTED*__
__*REPEATABLE READ*__

+ TiDB supports the following transaction isolation levels:
  + `READ COMMITTED`: Dirty Read can't happen
  + `REPEATABLE READ`: Dirty Read, Non-Repeatable Read, Phantom Read can't happen
+ Pessimistic transaction mode support:
  + `REPEATABLE READ` 
  + `READ COMMITTED` 
+ Optimistic transaction mode only supports:
  + `REPEATABLE READ` 
+ Set the session isolation level: `SET transaction_isolation='read-committed|repeatable-read';`  
------------------------------------------------------------------------------------------------
The REPEATABLE READ isolation level only sees data committed before the transaction begins, and it never sees either uncommitted data or changes committed during transaction execution by concurrent transactions. However, the transaction statement does see the effects of previous updates executed within its own transaction, even though they are not yet committed.

For transactions running on different nodes, the start and commit order depends on the order that the timestamp is obtained from PD.

For historical reasons, the Read Committed isolation level of current mainstream databases is essentially the Consistent Read isolation level defined by Oracle. In order to adapt to this situation, the Read Committed isolation level in TiDB pessimistic transactions is also a consistent read behavior in essence.

