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

📄 orderbyelimination.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 5 页
字号:
ij> -- test elimination of sort for order byset isolation to rr;0 rows inserted/updated/deletedij> -- test combining of sorts for distinct and order by-- create some tablescreate table t1(c1 int, c2 int, c3 int, c4 int);0 rows inserted/updated/deletedij> insert into t1 values (1, 2, 3, 4);1 row inserted/updated/deletedij> insert into t1 values (2, 3, 4, 5);1 row inserted/updated/deletedij> insert into t1 values (-1, -2, -3, -4);1 row inserted/updated/deletedij> insert into t1 values (-2, -3, -4, -5);1 row inserted/updated/deletedij> insert into t1 values (1, 2, 4, 3);1 row inserted/updated/deletedij> insert into t1 values (1, 3, 2, 4);1 row inserted/updated/deletedij> insert into t1 values (1, 3, 4, 2);1 row inserted/updated/deletedij> insert into t1 values (1, 4, 2, 3);1 row inserted/updated/deletedij> insert into t1 values (1, 4, 3, 2);1 row inserted/updated/deletedij> insert into t1 values (2, 1, 4, 3);1 row inserted/updated/deletedij> maximumdisplaywidth 7000;ij> call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);0 rows inserted/updated/deletedij> -- no index on t1-- full matchselect distinct c1, c2, c3, c4 from t1 order by 1, 2, 3, 4;C1         |C2         |C3         |C4         ------------------------------------------------2         |-3         |-4         |-5         -1         |-2         |-3         |-4         1          |2          |3          |4          1          |2          |4          |3          1          |3          |2          |4          1          |3          |4          |2          1          |4          |2          |3          1          |4          |3          |2          2          |1          |4          |3          2          |3          |4          |5          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	-- no index on t1-- full matchselect distinct c1, c2, c3, c4 from t1 order by 1, 2, 3, 4Parse 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 = 10Rows returned = 10Eliminate duplicates = trueIn sorted order = falseSort information: 	Number of rows input=10	Number of rows output=10	constructor time (milliseconds) = 0	open time (milliseconds) = 0	next time (milliseconds) = 0	close time (milliseconds) = 0Source 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 = 10	Rows filtered = 0	Fetch Size = 16		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=4		Number of pages visited=1		Number of rows qualified=10		Number of rows visited=10		Scan type=heap		start position: null		stop position: null		qualifiers:Noneij> select distinct c1, c2, c3, c4 from t1 order by c1, c2, c3, c4;C1         |C2         |C3         |C4         ------------------------------------------------2         |-3         |-4         |-5         -1         |-2         |-3         |-4         1          |2          |3          |4          1          |2          |4          |3          1          |3          |2          |4          1          |3          |4          |2          1          |4          |2          |3          1          |4          |3          |2          2          |1          |4          |3          2          |3          |4          |5          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	select distinct c1, c2, c3, c4 from t1 order by c1, c2, c3, c4Parse 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 = 10Rows returned = 10Eliminate duplicates = trueIn sorted order = falseSort information: 	Number of rows input=10	Number of rows output=10	constructor time (milliseconds) = 0	open time (milliseconds) = 0	next time (milliseconds) = 0	close time (milliseconds) = 0Source 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 = 10	Rows filtered = 0	Fetch Size = 16		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=4		Number of pages visited=1		Number of rows qualified=10		Number of rows visited=10		Scan type=heap		start position: null		stop position: null		qualifiers:Noneij> -- in order prefixselect distinct c3, c4 from t1 order by 1, 2;C3         |C4         ------------------------4         |-5         -3         |-4         2          |3          2          |4          3          |2          3          |4          4          |2          4          |3          4          |5          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	-- in order prefixselect distinct c3, c4 from t1 order by 1, 2Parse 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 = 10Rows returned = 9Eliminate duplicates = trueIn sorted order = falseSort information: 	Number of rows input=10	Number of rows output=9	constructor time (milliseconds) = 0	open time (milliseconds) = 0	next time (milliseconds) = 0	close time (milliseconds) = 0Source 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 = 10	Rows filtered = 0	Fetch Size = 16		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={2, 3}		Number of columns fetched=2		Number of pages visited=1		Number of rows qualified=10		Number of rows visited=10		Scan type=heap		start position: null		stop position: null		qualifiers:Noneij> select distinct c3, c4 from t1 order by c3, c4;C3         |C4         ------------------------4         |-5         -3         |-4         2          |3          2          |4          3          |2          3          |4          4          |2          4          |3          4          |5          ij> values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Statement Name: 	nullStatement Text: 	select distinct c3, c4 from t1 order by c3, c4Parse 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 = 1

⌨️ 快捷键说明

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