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

📄 predicatesintoviews.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 5 页
字号:
ij> -- test the pushing of predicates into unflattened views-- and derived tablesset isolation to rr;0 rows inserted/updated/deletedij> -- by default, holdability of ResultSet objects created using this Connection object is true. Following will set it to false for this connection.NoHoldForConnection;ij> -- set upcreate table t1(c1 int, c2 int, c3 varchar(2000));0 rows inserted/updated/deletedij> -- simple viewscreate view sv1 (c1, c2, c3) as select c1, c2, c3 || '$' from t1;0 rows inserted/updated/deletedij> create view sv2 (x1, x2, x3) as select c1, c2, c3  || '$' from t1;0 rows inserted/updated/deletedij> create view sv3 (y1, y2, y3) as select x1, x2, x3  || '$' from sv2;0 rows inserted/updated/deletedij> create view sv4 (z1, z2, z3, z4, z5, z6) asselect a.c1, a.c2, a.c3 || '$', b.c1, b.c2, b.c3 || '$' from t1 a, t1 b;0 rows inserted/updated/deletedij> -- more complex viewscreate view av1 (c1, c2) as select c1, max(c2) from t1 group by c1;0 rows inserted/updated/deletedij> create view av2 (x1, x2) as select c1, max(c2) from av1 group by c1;0 rows inserted/updated/deletedij> create view av3 (y1, y2, y3, y4) asselect a.c1, b.c1, max(a.c2), max(b.c2) from t1 a, t1 b group by a.c1, b.c1;0 rows inserted/updated/deletedij> -- non-flattenable derived table in a non-flattenable viewcreate view cv1 (c1, c2) asselect c1, max(c2) from (select c1, c2 + 1 from t1) t(c1, c2) group by c1;0 rows inserted/updated/deletedij> -- populate the tablesinsert into t1 values (1, 1, ''), (1, 1, ''), (1, 2, ''), (1, 2, ''),		      (2, 2, ''), (2, 2, ''), (2, 3, ''), (2, 3, '');8 rows inserted/updated/deletedij> call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);0 rows inserted/updated/deletedij> maximumdisplaywidth 20000;ij> -- predicate should get pushed into scanselect c1, c2 from sv1 where c1 = 1 order by c1, c2;C1         |C2         -----------------------1          |1          1          |1          1          |2          1          |2          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	-- predicate should get pushed into scanselect c1, c2 from sv1 where c1 = 1 order by c1, c2Parse 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: Sort ResultSet:Number of opens = 1Rows input = 4Rows returned = 4Eliminate duplicates = falseIn sorted order = falseSort information: 	Number of rows input=4	Number of rows output=4	constructor time (milliseconds) = 0	open time (milliseconds) = 0	next time (milliseconds) = 0	close time (milliseconds) = 0Source result set:	Project-Restrict ResultSet (3):	Number of opens = 1	Rows seen = 4	Rows filtered = 0	restriction = false	projection = true		constructor time (milliseconds) = 0		open time (milliseconds) = 0		next time (milliseconds) = 0		close time (milliseconds) = 0		restriction time (milliseconds) = 0		projection time (milliseconds) = 0	Source result set:		Project-Restrict ResultSet (2):		Number of opens = 1		Rows seen = 4		Rows filtered = 0		restriction = false		projection = true			constructor time (milliseconds) = 0			open time (milliseconds) = 0			next time (milliseconds) = 0			close time (milliseconds) = 0			restriction time (milliseconds) = 0			projection time (milliseconds) = 0		Source result set:			Table Scan ResultSet for T1 at serializable isolation level using share table locking chosen by the optimizer			Number of opens = 1			Rows seen = 4			Rows filtered = 0			Fetch Size = 1				constructor time (milliseconds) = 0				open time (milliseconds) = 0				next time (milliseconds) = 0				close time (milliseconds) = 0				next time in milliseconds/row = 0			scan information: 				Bit set of columns fetched=All				Number of columns fetched=3				Number of pages visited=1				Number of rows qualified=4				Number of rows visited=8				Scan type=heap				start position: null				stop position: null				qualifiers:Column[0][0] Id: 0Operator: =Ordered nulls: falseUnknown return value: falseNegate comparison result: falseij> select c1, c2 from sv1 where c1 = 1  + 1 order by c1, c2;C1         |C2         -----------------------2          |2          2          |2          2          |3          2          |3          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	select c1, c2 from sv1 where c1 = 1  + 1 order by c1, c2Parse 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: Sort ResultSet:Number of opens = 1Rows input = 4Rows returned = 4Eliminate duplicates = falseIn sorted order = falseSort information: 	Number of rows input=4	Number of rows output=4	constructor time (milliseconds) = 0	open time (milliseconds) = 0	next time (milliseconds) = 0	close time (milliseconds) = 0Source result set:	Project-Restrict ResultSet (3):	Number of opens = 1	Rows seen = 4	Rows filtered = 0	restriction = false	projection = true		constructor time (milliseconds) = 0		open time (milliseconds) = 0		next time (milliseconds) = 0		close time (milliseconds) = 0		restriction time (milliseconds) = 0		projection time (milliseconds) = 0	Source result set:		Project-Restrict ResultSet (2):		Number of opens = 1		Rows seen = 4		Rows filtered = 0		restriction = false		projection = true			constructor time (milliseconds) = 0			open time (milliseconds) = 0			next time (milliseconds) = 0			close time (milliseconds) = 0			restriction time (milliseconds) = 0			projection time (milliseconds) = 0		Source result set:			Table Scan ResultSet for T1 at serializable isolation level using share table locking chosen by the optimizer			Number of opens = 1			Rows seen = 4			Rows filtered = 0			Fetch Size = 1				constructor time (milliseconds) = 0				open time (milliseconds) = 0				next time (milliseconds) = 0				close time (milliseconds) = 0				next time in milliseconds/row = 0			scan information: 				Bit set of columns fetched=All				Number of columns fetched=3				Number of pages visited=1				Number of rows qualified=4				Number of rows visited=8				Scan type=heap				start position: null				stop position: null				qualifiers:Column[0][0] Id: 0Operator: =Ordered nulls: falseUnknown return value: falseNegate comparison result: falseij> select x1, x2 from sv2 where x1 = 1 order by x1, x2;X1         |X2         -----------------------1          |1          1          |1          1          |2          1          |2          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	select x1, x2 from sv2 where x1 = 1 order by x1, x2Parse 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: Sort ResultSet:Number of opens = 1Rows input = 4Rows returned = 4Eliminate duplicates = falseIn sorted order = falseSort information: 	Number of rows input=4	Number of rows output=4	constructor time (milliseconds) = 0	open time (milliseconds) = 0	next time (milliseconds) = 0	close time (milliseconds) = 0Source result set:	Project-Restrict ResultSet (3):	Number of opens = 1	Rows seen = 4	Rows filtered = 0	restriction = false	projection = true		constructor time (milliseconds) = 0		open time (milliseconds) = 0		next time (milliseconds) = 0		close time (milliseconds) = 0		restriction time (milliseconds) = 0		projection time (milliseconds) = 0

⌨️ 快捷键说明

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