db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fuzzylo...@apache.org
Subject svn commit: r427911 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/sql/execute/rts/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Wed, 02 Aug 2006 06:28:47 GMT
Author: fuzzylogic
Date: Tue Aug  1 23:28:46 2006
New Revision: 427911

URL: http://svn.apache.org/viewvc?rev=427911&view=rev
Log:
DERBY-939: Add missed files from checkin of derby939trunkdiffpatch2.txt

Added:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java
  (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setOpPlan.out
  (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/setOpPlan.sql
  (with props)

Added: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java?rev=427911&view=auto
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java
(added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java
Tue Aug  1 23:28:46 2006
@@ -0,0 +1,208 @@
+/*
+
+   Derby - Class org.apache.derby.impl.sql.execute.rts.RealSetOpResultSetStatistics
+
+   Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+
+package org.apache.derby.impl.sql.execute.rts;
+
+import org.apache.derby.iapi.services.i18n.MessageService;
+import org.apache.derby.iapi.reference.SQLState;
+
+import org.apache.derby.impl.sql.compile.IntersectOrExceptNode;
+
+/**
+  ResultSetStatistics implementation for SetOpResultSet.
+
+  @author yip
+
+*/
+public class RealSetOpResultSetStatistics 
+    extends RealNoPutResultSetStatistics
+{
+	
+    /* Leave these fields public for object inspectors */
+    public int opType;
+    public int rowsSeenLeft;
+    public int rowsSeenRight;
+    public int rowsReturned;
+    public ResultSetStatistics leftResultSetStatistics;
+    public ResultSetStatistics rightResultSetStatistics;
+
+    // CONSTRUCTORS
+
+    /**
+     *  Constructs a new <code>RealSetOpResultSetStatistics</code> object 
+     *  to represent the runtime statistics for <code>SetOpResultSet</code>.
 
+     * 
+     *  @param   opType                       set operation type 
+     *  @param   numOpens                     number of open
+     *  @param   rowsSeen                     rows seen
+     *  @param   rowsFiltered                 rows filtered
+     *  @param   constructorTime              the time for construction
+     *  @param   openTime                     the time for open operation
+     *  @param   nextTime                     the time for next operation
+     *  @param   closeTime                    the time for close operation
+     *  @param   resultSetNumber              the result set number
+     *  @param   rowsSeenLeft                 rows seen by left source input
+     *  @param   rowsSeenRight                rows seen by right source input
+     *  @param   rowsReturned                 rows returned
+     *  @param   optimizerEstimatedRowCount   optimizer estimated row count
+     *  @param   optimizerEstimatedCost       optimizer estimated cost
+     *  @param   leftResultSetStatistics      left source runtime statistics
+     *  @param   rightResultSetStatistics     right source runtime statistics
+     *  
+     *  @see     org.apache.derby.impl.sql.execute.SetOpResultSet  
+     */
+    public	RealSetOpResultSetStatistics(
+                                 int opType,
+                                 int numOpens,
+                                 int rowsSeen,
+                                 int rowsFiltered,
+                                 long constructorTime,
+                                 long openTime,
+                                 long nextTime,
+                                 long closeTime,
+                                 int resultSetNumber,
+                                 int rowsSeenLeft,
+                                 int rowsSeenRight,
+                                 int rowsReturned,
+                                 double optimizerEstimatedRowCount,
+                                 double optimizerEstimatedCost,
+                                 ResultSetStatistics leftResultSetStatistics,
+                                 ResultSetStatistics rightResultSetStatistics 
+                                )
+    {
+        super(
+            numOpens,
+            rowsSeen,
+            rowsFiltered,
+            constructorTime,
+            openTime,
+            nextTime,
+            closeTime,
+            resultSetNumber,
+            optimizerEstimatedRowCount,
+            optimizerEstimatedCost
+            );
+		
+        this.opType = opType;
+        this.rowsSeenLeft = rowsSeenLeft;
+        this.rowsSeenRight = rowsSeenRight;
+        this.rowsReturned = rowsReturned;
+        this.leftResultSetStatistics = leftResultSetStatistics;
+        this.rightResultSetStatistics = rightResultSetStatistics;
+    }
+
+    // ResultSetStatistics methods
+
+    /**
+     * Return the statement execution plan as a <code>String</code>.
+     *
+     * @param depth	Indentation level.
+     *
+     * @return the statement execution plan as a <code>String</code>.
+     */
+    public String getStatementExecutionPlanText(int depth) {
+        initFormatInfo(depth);
+
+        String rs = (opType == IntersectOrExceptNode.INTERSECT_OP) 
+                ? (SQLState.RTS_INTERSECT_RS) : (SQLState.RTS_EXCEPT_RS);
+         
+        return
+            indent + MessageService.getTextMessage(rs) + 
+                ":\n" +
+            indent + MessageService.getTextMessage(SQLState.RTS_NUM_OPENS) + 
+                " = " + numOpens + "\n" +
+            indent + MessageService.getTextMessage(
+                                            SQLState.RTS_ROWS_SEEN_LEFT) +
+                " = " + rowsSeenLeft + "\n" + 
+            indent + MessageService.getTextMessage(
+                                            SQLState.RTS_ROWS_SEEN_RIGHT) + 
+                " = " + rowsSeenRight + "\n" +
+            indent + MessageService.getTextMessage(
+                                            SQLState.RTS_ROWS_RETURNED) +
+                " = " + rowsReturned + "\n" + 
+            dumpTimeStats(indent, subIndent) + "\n" +
+            dumpEstimatedCosts(subIndent) + "\n" +
+            indent + MessageService.getTextMessage(SQLState.RTS_LEFT_RS) +
+                ":\n" + 
+            leftResultSetStatistics.getStatementExecutionPlanText(sourceDepth) +
+                "\n" + 
+            indent + MessageService.getTextMessage(SQLState.RTS_RIGHT_RS) +
+                ":\n" + 
+            rightResultSetStatistics.getStatementExecutionPlanText(
+            		                                              sourceDepth) + 
+                "\n";
+    }
+
+    /**
+     * Return information on the scan nodes from the statement execution 
+     * plan as a <code>String</code>.
+     *
+     * @param depth	Indentation level.
+     * @param tableName if not NULL then print information for this table only
+     *
+     * @return String	The information on the scan nodes from the 
+     *					statement execution plan as a <code>String</code>.
+     */
+    public String getScanStatisticsText(String tableName, int depth) {
+        return leftResultSetStatistics.getScanStatisticsText(tableName, depth)
+            + rightResultSetStatistics.getScanStatisticsText(tableName, depth);
+    }
+
+    // Class implementation
+
+    /**
+     * Return the runtime statistics of this object in textual representation
+     *
+     * @return the runtime statistics of this object in textual representation 
+     *         as a <code>String</code>.
+     */
+    public String toString() {
+        return getStatementExecutionPlanText(0);
+    }
+
+    /**
+     * Retrieves the children runtime statistics of this <code>
+     * RealSetOpResultSetStatistics</code> object 
+     *
+     * @return the children runtime statistics of this <code>
+     *         RealSetOpResultSetStatistics</code> object stored in a <code>
+     *         Vector</code>. 
+     *         
+     */
+    public java.util.Vector getChildren() {
+        java.util.Vector children = new java.util.Vector();
+        children.addElement(leftResultSetStatistics);
+        children.addElement(rightResultSetStatistics);
+        return children;
+    }
+
+    /**
+     * Format for display, a name for this node.
+     *
+     * @return the name of the node as a <code>String</code>.
+     */
+    public String getNodeName() {
+        String nodeName = 
+            (opType == IntersectOrExceptNode.INTERSECT_OP) 
+                ? (SQLState.RTS_INTERSECT) : (SQLState.RTS_EXCEPT);
+		
+        return MessageService.getTextMessage(nodeName);
+    }
+} 

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setOpPlan.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setOpPlan.out?rev=427911&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setOpPlan.out
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setOpPlan.out
Tue Aug  1 23:28:46 2006
@@ -0,0 +1,454 @@
+ij> -- DERBY-939 
+-- Test union and intersect/except with runtime statistics enabled.
+CREATE TABLE t1 (i int);
+0 rows inserted/updated/deleted
+ij> CREATE TABLE t2 (j int);
+0 rows inserted/updated/deleted
+ij> CREATE TABLE t3 (k int);
+0 rows inserted/updated/deleted
+ij> INSERT INTO t1 VALUES 3,2,1;
+3 rows inserted/updated/deleted
+ij> INSERT INTO t2 VALUES 1,2,3,4;
+4 rows inserted/updated/deleted
+ij> INSERT INTO t3 VALUES 5,2,3,4,1;
+5 rows inserted/updated/deleted
+ij> CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);
+0 rows inserted/updated/deleted
+ij> MaximumDisplayWidth 7000;
+ij> SELECT i FROM t1 UNION SELECT j FROM t2 INTERSECT SELECT k FROM t3;
+1          
+-----------
+1          
+2          
+3          
+4          
+ij> VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
+1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                    
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 -----------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	SELECT i FROM t1 UNION SELECT j FROM t2 INTERSECT SELECT k FROM t3
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Sort ResultSet:
+Number of opens = 1
+Rows input = 7
+Rows returned = 4
+Eliminate duplicates = true
+In sorted order = false
+Sort information: 
+	Number of rows input=7
+	Number of rows output=4
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+Source result set:
+	Union ResultSet:
+	Number of opens = 1
+	Rows seen from the left = 3
+	Rows seen from the right = 4
+	Rows returned = 7
+		constructor time (milliseconds) = 0
+		open time (milliseconds) = 0
+		next time (milliseconds) = 0
+		close time (milliseconds) = 0
+	Left result set:
+		Table Scan ResultSet for T1 at read committed isolation level using instantaneous share
row locking chosen by the optimizer
+		Number of opens = 1
+		Rows seen = 3
+		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=1
+			Number of pages visited=1
+			Number of rows qualified=3
+			Number of rows visited=3
+			Scan type=heap
+			start position: 
+null			stop position: 
+null			qualifiers:
+None
+	Right result set:
+		Intersect ResultSet:
+		Number of opens = 1
+		Rows seen from the left = 4
+		Rows seen from the right = 4
+		Rows returned = 4
+			constructor time (milliseconds) = 0
+			open time (milliseconds) = 0
+			next time (milliseconds) = 0
+			close time (milliseconds) = 0
+		Left result set:
+			Sort ResultSet:
+			Number of opens = 1
+			Rows input = 4
+			Rows returned = 4
+			Eliminate duplicates = false
+			In sorted order = false
+			Sort 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) = 0
+			Source result set:
+				Table Scan ResultSet for T2 at read committed isolation level using instantaneous share
row locking chosen by the optimizer
+				Number of opens = 1
+				Rows seen = 4
+				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=1
+					Number of pages visited=1
+					Number of rows qualified=4
+					Number of rows visited=4
+					Scan type=heap
+					start position: 
+null					stop position: 
+null					qualifiers:
+None
+		Right result set:
+			Sort ResultSet:
+			Number of opens = 1
+			Rows input = 5
+			Rows returned = 4
+			Eliminate duplicates = false
+			In sorted order = false
+			Sort information: 
+				Number of rows input=5
+				Number of rows output=5
+				constructor time (milliseconds) = 0
+				open time (milliseconds) = 0
+				next time (milliseconds) = 0
+				close time (milliseconds) = 0
+			Source result set:
+				Table Scan ResultSet for T3 at read committed isolation level using instantaneous share
row locking chosen by the optimizer
+				Number of opens = 1
+				Rows seen = 5
+				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=1
+					Number of pages visited=1
+					Number of rows qualified=5
+					Number of rows visited=5
+					Scan type=heap
+					start position: 
+null					stop position: 
+null					qualifiers:
+None
+ij> SELECT i FROM t1 UNION SELECT j FROM t2 EXCEPT SELECT k FROM t3;
+1          
+-----------
+ij> VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
+1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                    
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 -----------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	SELECT i FROM t1 UNION SELECT j FROM t2 EXCEPT SELECT k FROM t3
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Except ResultSet:
+Number of opens = 1
+Rows seen from the left = 4
+Rows seen from the right = 4
+Rows returned = 0
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+Left result set:
+	Sort ResultSet:
+	Number of opens = 1
+	Rows input = 7
+	Rows returned = 4
+	Eliminate duplicates = true
+	In sorted order = false
+	Sort information: 
+		Number of rows input=7
+		Number of rows output=4
+		constructor time (milliseconds) = 0
+		open time (milliseconds) = 0
+		next time (milliseconds) = 0
+		close time (milliseconds) = 0
+	Source result set:
+		Union ResultSet:
+		Number of opens = 1
+		Rows seen from the left = 3
+		Rows seen from the right = 4
+		Rows returned = 7
+			constructor time (milliseconds) = 0
+			open time (milliseconds) = 0
+			next time (milliseconds) = 0
+			close time (milliseconds) = 0
+		Left result set:
+			Table Scan ResultSet for T1 at read committed isolation level using instantaneous share
row locking chosen by the optimizer
+			Number of opens = 1
+			Rows seen = 3
+			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=1
+				Number of pages visited=1
+				Number of rows qualified=3
+				Number of rows visited=3
+				Scan type=heap
+				start position: 
+null				stop position: 
+null				qualifiers:
+None
+		Right result set:
+			Table Scan ResultSet for T2 at read committed isolation level using instantaneous share
row locking chosen by the optimizer
+			Number of opens = 1
+			Rows seen = 4
+			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=1
+				Number of pages visited=1
+				Number of rows qualified=4
+				Number of rows visited=4
+				Scan type=heap
+				start position: 
+null				stop position: 
+null				qualifiers:
+None
+Right result set:
+	Sort ResultSet:
+	Number of opens = 1
+	Rows input = 5
+	Rows returned = 4
+	Eliminate duplicates = false
+	In sorted order = false
+	Sort information: 
+		Number of rows input=5
+		Number of rows output=5
+		constructor time (milliseconds) = 0
+		open time (milliseconds) = 0
+		next time (milliseconds) = 0
+		close time (milliseconds) = 0
+	Source result set:
+		Table Scan ResultSet for T3 at read committed isolation level using instantaneous share
row locking chosen by the optimizer
+		Number of opens = 1
+		Rows seen = 5
+		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=1
+			Number of pages visited=1
+			Number of rows qualified=5
+			Number of rows visited=5
+			Scan type=heap
+			start position: 
+null			stop position: 
+null			qualifiers:
+None
+ij> SELECT i FROM t1 INTERSECT SELECT j FROM t2 EXCEPT SELECT k FROM t3;
+1          
+-----------
+ij> VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
+1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                         

                                    
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 -----------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	SELECT i FROM t1 INTERSECT SELECT j FROM t2 EXCEPT SELECT k FROM t3
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Except ResultSet:
+Number of opens = 1
+Rows seen from the left = 3
+Rows seen from the right = 3
+Rows returned = 0
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+Left result set:
+	Intersect ResultSet:
+	Number of opens = 1
+	Rows seen from the left = 3
+	Rows seen from the right = 3
+	Rows returned = 3
+		constructor time (milliseconds) = 0
+		open time (milliseconds) = 0
+		next time (milliseconds) = 0
+		close time (milliseconds) = 0
+	Left result set:
+		Sort ResultSet:
+		Number of opens = 1
+		Rows input = 3
+		Rows returned = 3
+		Eliminate duplicates = false
+		In sorted order = false
+		Sort information: 
+			Number of rows input=3
+			Number of rows output=3
+			constructor time (milliseconds) = 0
+			open time (milliseconds) = 0
+			next time (milliseconds) = 0
+			close time (milliseconds) = 0
+		Source result set:
+			Table Scan ResultSet for T1 at read committed isolation level using instantaneous share
row locking chosen by the optimizer
+			Number of opens = 1
+			Rows seen = 3
+			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=1
+				Number of pages visited=1
+				Number of rows qualified=3
+				Number of rows visited=3
+				Scan type=heap
+				start position: 
+null				stop position: 
+null				qualifiers:
+None
+	Right result set:
+		Sort ResultSet:
+		Number of opens = 1
+		Rows input = 4
+		Rows returned = 3
+		Eliminate duplicates = false
+		In sorted order = false
+		Sort 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) = 0
+		Source result set:
+			Table Scan ResultSet for T2 at read committed isolation level using instantaneous share
row locking chosen by the optimizer
+			Number of opens = 1
+			Rows seen = 4
+			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=1
+				Number of pages visited=1
+				Number of rows qualified=4
+				Number of rows visited=4
+				Scan type=heap
+				start position: 
+null				stop position: 
+null				qualifiers:
+None
+Right result set:
+	Sort ResultSet:
+	Number of opens = 1
+	Rows input = 5
+	Rows returned = 3
+	Eliminate duplicates = false
+	In sorted order = false
+	Sort information: 
+		Number of rows input=5
+		Number of rows output=5
+		constructor time (milliseconds) = 0
+		open time (milliseconds) = 0
+		next time (milliseconds) = 0
+		close time (milliseconds) = 0
+	Source result set:
+		Table Scan ResultSet for T3 at read committed isolation level using instantaneous share
row locking chosen by the optimizer
+		Number of opens = 1
+		Rows seen = 5
+		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=1
+			Number of pages visited=1
+			Number of rows qualified=5
+			Number of rows visited=5
+			Scan type=heap
+			start position: 
+null			stop position: 
+null			qualifiers:
+None
+ij> CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0);
+0 rows inserted/updated/deleted
+ij> 

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setOpPlan.out
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/setOpPlan.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/setOpPlan.sql?rev=427911&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/setOpPlan.sql
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/setOpPlan.sql
Tue Aug  1 23:28:46 2006
@@ -0,0 +1,21 @@
+-- DERBY-939 
+-- Test union and intersect/except with runtime statistics enabled.
+CREATE TABLE t1 (i int);
+CREATE TABLE t2 (j int);
+CREATE TABLE t3 (k int);
+INSERT INTO t1 VALUES 3,2,1;
+INSERT INTO t2 VALUES 1,2,3,4;
+INSERT INTO t3 VALUES 5,2,3,4,1;
+CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);
+MaximumDisplayWidth 7000;
+
+SELECT i FROM t1 UNION SELECT j FROM t2 INTERSECT SELECT k FROM t3;
+VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
+
+SELECT i FROM t1 UNION SELECT j FROM t2 EXCEPT SELECT k FROM t3;
+VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
+
+SELECT i FROM t1 INTERSECT SELECT j FROM t2 EXCEPT SELECT k FROM t3;
+VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
+
+CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0);

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/setOpPlan.sql
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message