728x90
반응형
Transaction Isolation Level의 종류
구분 | Dirty read | Nonrepeatable read | Phantom read |
Default (*) | / | / | / |
None (**) | / | / | / |
read_uncommitted | Allowed | Allowed | Allowed |
read_committed(***) | Prevented | Allowed | Allowed |
repeatable_read | Prevented | Prevented | Allowed |
serializable | Prevented | Prevented | Prevented |
- Dirty / NonRepeatable / Phantom read
- Dirty Read: Commit하지 않은 데이터에 대한 접근성 결정
- NonRepeatable Read: 동일한 트랜잭션에서 동일한 쿼리에 대한 검색이 되는 데이터의 일관성 여부 결정
- Phantom Read: 트랜잭션 실행 중 Insert로 데이터 행이 추가된 경우
- 데이터의 정합성이 어긋나는 상황을 피하기 위해 레코드 단위로 rock을 설정하게 되면 병렬처리가 되지 않는다.
- read_uncommitted < read_committed < repeatable_read < seriallzable 순으로 정합성이 높다.
- (*) DB에 세팅된 Isolation Level을 따른다.
- (**) JDBC 드라이버가 트랜잭션을 지원하지 않는 경우에 선택한다.
- (***) Oracle DB의 default isolation level은 read_committed이다.
Tip) DB의 정합성을 위해 레코드 단위로 rock을 설정하면 되지만 심각한 성능저하로 인해 상황에 맞는 적절한 설정이 필요하다.
참고 URL: blog.inspien.co.kr/54
[XI/PI]Transaction Isolation Level(트랜잭션 고립 레벨)
JDBC Sender - Advanced tab DB의 데이터를 JDBC로 access시, 데이터의 정합성/일치성 을 보장하기 위한 기능 데이터의 정합성과 관련된 3가지 이슈를 피하기 위한 방법 Dirty / NonRepeatable / Phantom Read..
blog.inspien.co.kr
728x90
반응형