⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isolationlevels.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 3 页
字号:
ij> -- single user test for the various isolation levelsprepare getIsolation as 'values current isolation';ij> autocommit off;ij> call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);0 rows inserted/updated/deletedij> maximumdisplaywidth 2000;ij> -- create a tablecreate table t1(c1 int not null constraint asdf primary key);0 rows inserted/updated/deletedij> commit;ij> -- insert a rowinsert into t1 values 1;1 row inserted/updated/deletedij> -- verify table scan gets row lock at read committedselect * from t1;C1         -----------1          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	-- verify table scan gets row lock at read committedselect * from t1Parse 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 committed isolation level using instantaneous 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> -- verify matching index scan gets row lock at read committedselect * from t1 where c1 = 1;C1         -----------1          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	-- verify matching index scan gets row lock at read committedselect * from t1 where c1 = 1Parse 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 committed isolation level using share row locking chosen by the optimizerNumber of opens = 1Rows seen = 1Rows filtered = 0Fetch Size = 1	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: 	>= on first 1 column(s).	Ordered null semantics on the following columns: 0 	stop position: 	> on first 1 column(s).	Ordered null semantics on the following columns: 0 	qualifiers:Noneij> -- verify WITH clause worksselect * from t1 with rr;C1         -----------1          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	-- verify WITH clause worksselect * 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> -- verify SET ISOLATION commits and changes isolation levelset isolation RR;0 rows inserted/updated/deletedij> execute getIsolation;1   ----RR  ij> -- rollback should find nothing to undorollback;ij> select * from t1;C1         -----------1          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	select * from t1Parse 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 reset;0 rows inserted/updated/deletedij> execute getIsolation;1   ----ij> -- verify matching index scan gets row lock at read committedselect * from t1 where c1 = 1;C1         

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -