📄 db2isolationlevels.out
字号:
CS ij> select * from t1 with RR;C1 -----------1 ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: nullStatement Text: select * from t1 with RRParse Time: 0Bind Time: 0Optimize Time: 0Generate Time: 0Compile Time: 0Execute Time: 0Begin Compilation Timestamp : nullEnd Compilation Timestamp : nullBegin Execution Timestamp : nullEnd Execution Timestamp : nullStatement Execution Plan Text: Index Scan ResultSet for T1 using constraint ASDF at serializable isolation level using share table locking chosen by the optimizerNumber of opens = 1Rows seen = 1Rows filtered = 0Fetch Size = 16 constructor time (milliseconds) = 0 open time (milliseconds) = 0 next time (milliseconds) = 0 close time (milliseconds) = 0 next time in milliseconds/row = 0scan information: Bit set of columns fetched={0} Number of columns fetched=1 Number of deleted rows visited=0 Number of pages visited=1 Number of rows qualified=1 Number of rows visited=1 Scan type=btree Tree height=1 start position: None stop position: None qualifiers:Noneij> set isolation serializable;0 rows inserted/updated/deletedij> execute getIsolation;1 ----RR ij> select * from t1 with RS;C1 -----------1 ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: nullStatement Text: select * from t1 with RSParse Time: 0Bind Time: 0Optimize Time: 0Generate Time: 0Compile Time: 0Execute Time: 0Begin Compilation Timestamp : nullEnd Compilation Timestamp : nullBegin Execution Timestamp : nullEnd Execution Timestamp : nullStatement Execution Plan Text: Index Scan ResultSet for T1 using constraint ASDF at repeatable read isolation level using share row locking chosen by the optimizerNumber of opens = 1Rows seen = 1Rows filtered = 0Fetch Size = 16 constructor time (milliseconds) = 0 open time (milliseconds) = 0 next time (milliseconds) = 0 close time (milliseconds) = 0 next time in milliseconds/row = 0scan information: Bit set of columns fetched={0} Number of columns fetched=1 Number of deleted rows visited=0 Number of pages visited=1 Number of rows qualified=1 Number of rows visited=1 Scan type=btree Tree height=1 start position: None stop position: None qualifiers:Noneij> set current isolation to read committed;0 rows inserted/updated/deletedij> execute getIsolation;1 ----CS ij> select * from t1 with ur;C1 -----------1 ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: nullStatement Text: select * from t1 with urParse Time: 0Bind Time: 0Optimize Time: 0Generate Time: 0Compile Time: 0Execute Time: 0Begin Compilation Timestamp : nullEnd Compilation Timestamp : nullBegin Execution Timestamp : nullEnd Execution Timestamp : nullStatement Execution Plan Text: Index Scan ResultSet for T1 using constraint ASDF at read uncommitted isolation level using share row locking chosen by the optimizerNumber of opens = 1Rows seen = 1Rows filtered = 0Fetch Size = 16 constructor time (milliseconds) = 0 open time (milliseconds) = 0 next time (milliseconds) = 0 close time (milliseconds) = 0 next time in milliseconds/row = 0scan information: Bit set of columns fetched={0} Number of columns fetched=1 Number of deleted rows visited=0 Number of pages visited=1 Number of rows qualified=1 Number of rows visited=1 Scan type=btree Tree height=1 start position: None stop position: None qualifiers:Noneij> -- unknown isolation levelselect * from t1 with rw;ERROR 42X01: Syntax error: Encountered "rw" at line 2, column 23.ij> select * from t1 with DIRTY READ;ERROR 42X01: Syntax error: Encountered "DIRTY" at line 1, column 23.ij> select * from t1 with READ UNCOMMITTED;ERROR 42X01: Syntax error: Encountered "READ" at line 1, column 23.ij> select * from t1 with READ COMMITTED;ERROR 42X01: Syntax error: Encountered "READ" at line 1, column 23.ij> select * from t1 with CURSOR STABILITY;ERROR 42X01: Syntax error: Encountered "CURSOR" at line 1, column 23.ij> select * from t1 with REPEATABLE READ;ERROR 42X01: Syntax error: Encountered "REPEATABLE" at line 1, column 23.ij> select * from t1 with SERIALIZABLE;ERROR 42X01: Syntax error: Encountered "SERIALIZABLE" at line 1, column 23.ij> -- check the db2 isolation levels can be used as identifierscreate table db2iso(cs int, rr int, ur int, rs int);0 rows inserted/updated/deletedij> select cs, rr, ur, rs from db2iso;CS |RR |UR |RS -----------------------------------------------ij> -- cleanupdrop table t1;0 rows inserted/updated/deletedij>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -