db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1509815 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/compile/ impl/sql/compile/
Date Fri, 02 Aug 2013 19:05:28 GMT
Author: rhillegas
Date: Fri Aug  2 19:05:28 2013
New Revision: 1509815

URL: http://svn.apache.org/r1509815
Log:
DERBY-6211: Move the tracer out of the optimizer; tests passed cleanly on derby-6211-11-ab-moveTracerOutOfOptimizer.diff.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizer.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java?rev=1509815&r1=1509814&r2=1509815&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java Fri
Aug  2 19:05:28 2013
@@ -453,4 +453,11 @@ public interface Optimizable extends Vis
 	 */
 	public double uniqueJoin(OptimizablePredicateList predList)
 								throws StandardException;
+
+    /** Get the optimizer tracer, if any */
+    public  OptTrace    getOptimizerTracer();
+    
+    /** Report whether optimizer tracing is on */
+    public  boolean optimizerTracingIsOn();
+    
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizer.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizer.java?rev=1509815&r1=1509814&r2=1509815&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizer.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizer.java Fri Aug
 2 19:05:28 2013
@@ -87,9 +87,6 @@ public interface Optimizer
 	/** Indicates a sort-avoidance plan */
 	int SORT_AVOIDANCE_PLAN = 2;
 
-    /** Return true if optimizer tracing is on */
-    public  boolean tracingIsOn();
-
 	/**
 	 * Iterate through the permutations, returning false when the permutations
 	 * are exhausted.
@@ -188,9 +185,6 @@ public interface Optimizer
 	 */
 	public void modifyAccessPaths() throws StandardException;
 
-	/** Get the trace machinery */
-	public OptTrace tracer();
-
 	/** Get the estimated cost of the optimized query */
 	public CostEstimate getOptimizedCost();
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java?rev=1509815&r1=1509814&r2=1509815&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java Fri
Aug  2 19:05:28 2013
@@ -275,8 +275,8 @@ class FromBaseTable extends FromTable
 		ConglomerateDescriptor currentConglomerateDescriptor =
 												ap.getConglomerateDescriptor();
 
-        if ( optimizer.tracingIsOn() )
-        { optimizer.tracer().traceNextAccessPath( getExposedName(), ((predList == null) ?
0 : predList.size()) ); }
+        if ( optimizerTracingIsOn() )
+        { getOptimizerTracer().traceNextAccessPath( getExposedName(), ((predList == null)
? 0 : predList.size()) ); }
 
 		/*
 		** Remove the ordering of the current conglomerate descriptor,
@@ -306,8 +306,8 @@ class FromBaseTable extends FromTable
 			}
 			else
 			{
-                if ( optimizer.tracingIsOn() )
-                { optimizer.tracer().traceLookingForSpecifiedIndex( userSpecifiedIndexName,
tableNumber ); }
+                if ( optimizerTracingIsOn() )
+                { getOptimizerTracer().traceLookingForSpecifiedIndex( userSpecifiedIndexName,
tableNumber ); }
 
 				if (StringUtil.SQLToUpperCase(userSpecifiedIndexName).equals("NULL"))
 				{
@@ -414,13 +414,13 @@ class FromBaseTable extends FromTable
 
 		if (currentConglomerateDescriptor == null)
 		{
-            if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceNoMoreConglomerates(
tableNumber ); }
+            if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceNoMoreConglomerates(
tableNumber ); }
 		}
 		else
 		{
 			currentConglomerateDescriptor.setColumnNames(columnNames);
 
-            if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceConsideringConglomerate(
currentConglomerateDescriptor, tableNumber ); }
+            if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceConsideringConglomerate(
currentConglomerateDescriptor, tableNumber ); }
 		}
 
 		/*
@@ -438,14 +438,14 @@ class FromBaseTable extends FromTable
 				 */
 				if (! isOneRowResultSet(predList))
 				{
-                    if ( optimizer.tracingIsOn() )
-                    { optimizer.tracer().traceAddingUnorderedOptimizable( ((predList == null)
? 0 : predList.size()) ); }
+                    if ( optimizerTracingIsOn() )
+                    { getOptimizerTracer().traceAddingUnorderedOptimizable( ((predList ==
null) ? 0 : predList.size()) ); }
 
 					rowOrdering.addUnorderedOptimizable(this);
 				}
 				else
 				{
-                    if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceScanningHeapWithUniqueKey();
}
+                    if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceScanningHeapWithUniqueKey();
}
 				}
 			}
 			else
@@ -957,7 +957,7 @@ class FromBaseTable extends FromTable
 		JoinStrategy currentJoinStrategy = 
             currAccessPath.getJoinStrategy();
 
-        if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceEstimatingCostOfConglomerate(
cd, tableNumber ); }
+        if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceEstimatingCostOfConglomerate(
cd, tableNumber ); }
 
 		/* Get the uniqueness factory for later use (see below) */
 		double tableUniquenessFactor =
@@ -998,7 +998,7 @@ class FromBaseTable extends FromTable
 										(FormatableBitSet) null,
 										0);
 
-            if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceSingleMatchedRowCost(
cost, tableNumber ); }
+            if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceSingleMatchedRowCost(
cost, tableNumber ); }
 
             costEst.setCost(cost, 1.0d, 1.0d);
 
@@ -1054,15 +1054,15 @@ class FromBaseTable extends FromTable
                 currAccessPath.setLockMode(
 											TransactionController.MODE_RECORD);
 
-                if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceConstantStartStopPositions();
}
+                if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceConstantStartStopPositions();
}
 			}
 			else
 			{
                 setLockingBasedOnThreshold(optimizer, costEst.rowCount());
 			}
 
-            if (optimizer.tracingIsOn()) {
-                optimizer.tracer().traceCostOfNScans(
+            if (optimizerTracingIsOn()) {
+                getOptimizerTracer().traceCostOfNScans(
                     tableNumber,
                     outerCost.rowCount(),
                     costEst );
@@ -1098,7 +1098,7 @@ class FromBaseTable extends FromTable
                 costEst.setEstimatedCost(
                                 costEst.getEstimatedCost() + cost);
 
-                if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceNonCoveringIndexCost(
cost, tableNumber ); }
+                if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceNonCoveringIndexCost(
cost, tableNumber ); }
 			}
 		}
 		else
@@ -1531,9 +1531,9 @@ class FromBaseTable extends FromTable
 				}
 			}
 
-            if ( optimizer.tracingIsOn() )
+            if ( optimizerTracingIsOn() )
             {
-                optimizer.tracer().traceCostOfConglomerateScan
+                getOptimizerTracer().traceCostOfConglomerateScan
                     (
                      tableNumber,
                      cd,
@@ -1576,8 +1576,8 @@ class FromBaseTable extends FromTable
                     costEst.singleScanRowCount() *
                     statStartStopSelectivity);
                 
-                if (optimizer.tracingIsOn()) {
-                    optimizer.tracer().
+                if (optimizerTracingIsOn()) {
+                    getOptimizerTracer().
                         traceCostIncludingStatsForIndex(costEst, tableNumber);
                 }
 			}
@@ -1600,8 +1600,8 @@ class FromBaseTable extends FromTable
                          costEst.singleScanRowCount() *
                              extraFirstColumnSelectivity);
 
-                    if (optimizer.tracingIsOn()) {
-                        optimizer.tracer().
+                    if (optimizerTracingIsOn()) {
+                        getOptimizerTracer().
                             traceCostIncludingExtra1stColumnSelectivity(
                                 costEst, tableNumber);
                     }
@@ -1619,8 +1619,8 @@ class FromBaseTable extends FromTable
                         costEst.singleScanRowCount() *
                             extraStartStopSelectivity);
 
-                    if (optimizer.tracingIsOn()) {
-                        optimizer.tracer().traceCostIncludingExtraStartStop(
+                    if (optimizerTracingIsOn()) {
+                        getOptimizerTracer().traceCostIncludingExtraStartStop(
                             costEst, tableNumber);
                     }
 				}
@@ -1668,7 +1668,7 @@ class FromBaseTable extends FromTable
                 currAccessPath.setLockMode(
 											TransactionController.MODE_TABLE);
 
-                if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceNoStartStopPosition();
}
+                if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceNoStartStopPosition();
}
 			}
 			else
 			{
@@ -1777,8 +1777,8 @@ class FromBaseTable extends FromTable
                 costEst.setEstimatedCost(
                                 costEst.getEstimatedCost() + cost);
 
-                if (optimizer.tracingIsOn()) {
-                    optimizer.tracer().traceCostOfNoncoveringIndex(
+                if (optimizerTracingIsOn()) {
+                    getOptimizerTracer().traceCostOfNoncoveringIndex(
                         costEst, tableNumber);
                 }
 			}
@@ -1795,8 +1795,8 @@ class FromBaseTable extends FromTable
                         costEst.singleScanRowCount() *
                             extraQualifierSelectivity);
 
-                if (optimizer.tracingIsOn()) {
-                    optimizer.tracer().
+                if (optimizerTracingIsOn()) {
+                    getOptimizerTracer().
                         traceCostIncludingExtraQualifierSelectivity(
                             costEst, tableNumber);
                 }
@@ -1924,8 +1924,8 @@ class FromBaseTable extends FromTable
                 costEst.singleScanRowCount());
 
 
-            if (optimizer.tracingIsOn()) {
-                optimizer.tracer().traceCostOfNScans(
+            if (optimizerTracingIsOn()) {
+                getOptimizerTracer().traceCostOfNScans(
                     tableNumber, outerCost.rowCount(), costEst);
             }
 
@@ -1952,8 +1952,8 @@ class FromBaseTable extends FromTable
 			{
                 costEst.setCost(costEst.getEstimatedCost(), rc, src);
 
-                if (optimizer.tracingIsOn()) {
-                    optimizer.tracer().
+                if (optimizerTracingIsOn()) {
+                    getOptimizerTracer().
                         traceCostIncludingExtraNonQualifierSelectivity(
                             costEst, tableNumber);
                 }
@@ -1970,8 +1970,8 @@ class FromBaseTable extends FromTable
 				*/
 
 				double compositeStatRC = initialRowCount * statCompositeSelectivity;
-                if ( optimizer.tracingIsOn() )
-                { optimizer.tracer().traceCompositeSelectivityFromStatistics( statCompositeSelectivity
); }
+                if ( optimizerTracingIsOn() )
+                { getOptimizerTracer().traceCompositeSelectivityFromStatistics( statCompositeSelectivity
); }
 
 				if (tableUniquenessFactor > 0.0)
 				{
@@ -2001,8 +2001,8 @@ class FromBaseTable extends FromTable
 									 1 : 
 									 compositeStatRC / outerCost.rowCount());
 
-                if (optimizer.tracingIsOn()) {
-                    optimizer.tracer().
+                if (optimizerTracingIsOn()) {
+                    getOptimizerTracer().
                         traceCostIncludingCompositeSelectivityFromStats(
                             costEst, tableNumber);
                 }
@@ -2940,8 +2940,8 @@ class FromBaseTable extends FromTable
 		JoinStrategy trulyTheBestJoinStrategy = ap.getJoinStrategy();
         Optimizer opt = ap.getOptimizer();
 
-        if (opt.tracingIsOn()) {
-            opt.tracer().traceChangingAccessPathForTable(tableNumber);
+        if (optimizerTracingIsOn()) {
+            getOptimizerTracer().traceChangingAccessPathForTable(tableNumber);
         }
 
 		if (SanityManager.DEBUG)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java?rev=1509815&r1=1509814&r2=1509815&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java Fri Aug
 2 19:05:28 2013
@@ -249,7 +249,7 @@ abstract class FromTable extends ResultS
 
 			found = true;
 
-            if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceConsideringJoinStrategy(
ap.getJoinStrategy(), tableNumber ); }
+            if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceConsideringJoinStrategy(
ap.getJoinStrategy(), tableNumber ); }
 		}
 
 		/*
@@ -310,22 +310,22 @@ abstract class FromTable extends ResultS
 
 		ap.setJoinStrategy(getCurrentAccessPath().getJoinStrategy());
 
-        if (opt.tracingIsOn()) {
-            opt.tracer().traceRememberingJoinStrategy(
+        if (optimizerTracingIsOn()) {
+            getOptimizerTracer().traceRememberingJoinStrategy(
                 getCurrentAccessPath().getJoinStrategy(), tableNumber);
         }
 
 		if (ap == bestAccessPath)
 		{
-            if (opt.tracingIsOn()) {
-                opt.tracer().traceRememberingBestAccessPathSubstring(
+            if (optimizerTracingIsOn()) {
+                getOptimizerTracer().traceRememberingBestAccessPathSubstring(
                     ap, tableNumber);
             }
 		}
 		else if (ap == bestSortAvoidancePath)
 		{
-            if (opt.tracingIsOn()) {
-                opt.tracer().
+            if (optimizerTracingIsOn()) {
+                getOptimizerTracer().
                     traceRememberingBestSortAvoidanceAccessPathSubstring(
                         ap, tableNumber);
             }
@@ -341,8 +341,8 @@ abstract class FromTable extends ResultS
 					"unknown access path type");
 			}
 			 */
-            if (opt.tracingIsOn()) {
-                opt.tracer().traceRememberingBestUnknownAccessPathSubstring(
+            if (optimizerTracingIsOn()) {
+                getOptimizerTracer().traceRememberingBestUnknownAccessPathSubstring(
                     ap, tableNumber);
             }
 		}
@@ -647,8 +647,8 @@ abstract class FromTable extends ResultS
 
 		setCostEstimate(bestPath.getCostEstimate());
 
-        if ( bestPath.getOptimizer().tracingIsOn() )
-        { bestPath.getOptimizer().tracer().traceRememberingBestAccessPath( bestPath, tableNumber,
planType ); }
+        if ( optimizerTracingIsOn() )
+        { getOptimizerTracer().traceRememberingBestAccessPath( bestPath, tableNumber, planType
); }
 	}
 
 	/** @see Optimizable#startOptimizing */

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java?rev=1509815&r1=1509814&r2=1509815&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
Fri Aug  2 19:05:28 2013
@@ -68,7 +68,7 @@ class HashJoinStrategy extends BaseJoinS
 		 */
 		if (! innerTable.isMaterializable())
 		{
-            if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceSkipUnmaterializableHashJoin();
}
+            if ( innerTable.optimizerTracingIsOn() ) { innerTable.getOptimizerTracer().traceSkipUnmaterializableHashJoin();
}
 			return false;
 		}
 
@@ -150,15 +150,15 @@ class HashJoinStrategy extends BaseJoinS
 
 		if (SanityManager.DEBUG)
 		{
-            if ( optimizer.tracingIsOn() )
+            if ( innerTable.optimizerTracingIsOn() )
             {
                 if (hashKeyColumns == null)
                 {
-                    optimizer.tracer().traceSkipHashJoinNoHashKeys();
+                    innerTable.getOptimizerTracer().traceSkipHashJoinNoHashKeys();
                 }
                 else
                 {
-                    optimizer.tracer().traceHashKeyColumns( ArrayUtil.copy( hashKeyColumns
) );
+                    innerTable.getOptimizerTracer().traceHashKeyColumns( ArrayUtil.copy(
hashKeyColumns ) );
                 }
             }
 		}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java?rev=1509815&r1=1509814&r2=1509815&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java Fri Aug
 2 19:05:28 2013
@@ -161,7 +161,7 @@ class JoinNode extends TableOperatorNode
 							RowOrdering rowOrdering)
 			throws StandardException
 	{
-        if ( optimizer.tracingIsOn() ) { optimizer.tracer().traceOptimizingJoinNode(); }
+        if ( optimizerTracingIsOn() ) { getOptimizerTracer().traceOptimizingJoinNode(); }
 
 		// It's possible that a call to optimize the left/right will cause
 		// a new "truly the best" plan to be stored in the underlying base

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java?rev=1509815&r1=1509814&r2=1509815&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java
Fri Aug  2 19:05:28 2013
@@ -142,8 +142,8 @@ class NestedLoopJoinStrategy extends Bas
 							 CostEstimate costEstimate) {
 		costEstimate.multiply(outerCost.rowCount(), costEstimate);
 
-        if ( optimizer.tracingIsOn() )
-        { optimizer.tracer().traceCostOfNScans( innerTable.getTableNumber(), outerCost.rowCount(),
costEstimate ); }
+        if ( innerTable.optimizerTracingIsOn() )
+        { innerTable.getOptimizerTracer().traceCostOfNScans( innerTable.getTableNumber(),
outerCost.rowCount(), costEstimate ); }
 	}
 
 	/** @see JoinStrategy#maxCapacity */

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java?rev=1509815&r1=1509814&r2=1509815&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java Fri
Aug  2 19:05:28 2013
@@ -387,7 +387,7 @@ class OptimizerImpl implements Optimizer
 		desiredJoinOrderFound = false;
 	}
 
-    public  boolean tracingIsOn() { return lcc.optimizerTracingIsOn(); }
+    private  boolean tracingIsOn() { return lcc.optimizerTracingIsOn(); }
 
     public int getMaxMemoryPerTable()
     {
@@ -2848,7 +2848,7 @@ class OptimizerImpl implements Optimizer
 	}
 
     /** Get the trace machinery */
-    public  OptTrace    tracer()    { return lcc.getOptimizerTracer(); }
+    private  OptTrace    tracer()    { return lcc.getOptimizerTracer(); }
 
     public  int getOptimizableCount() { return optimizableList.size(); }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java?rev=1509815&r1=1509814&r2=1509815&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java Fri
Aug  2 19:05:28 2013
@@ -42,6 +42,7 @@ import org.apache.derby.iapi.sql.Stateme
 import org.apache.derby.iapi.sql.StatementUtil;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.compile.OptimizerFactory;
+import org.apache.derby.iapi.sql.compile.OptTrace;
 import org.apache.derby.iapi.sql.compile.Parser;
 import org.apache.derby.iapi.sql.compile.TypeCompiler;
 import org.apache.derby.iapi.sql.compile.Visitable;
@@ -144,6 +145,12 @@ public abstract class QueryTreeNode impl
                                                         getOptimizerFactory();
 	}
 
+    /** Convenience method for finding the optimizer tracer */
+    public  OptTrace    getOptimizerTracer()    { return getLanguageConnectionContext().getOptimizerTracer();
}
+
+    /** Convenience method for checking whether optimizer tracing is on */
+    public  boolean optimizerTracingIsOn() { return getLanguageConnectionContext().optimizerTracingIsOn();
}
+    
 	/**
 	  *	Gets the constant action factory for this database.
 	  *



Mime
View raw message