1 21 22 package org.apache.derby.impl.sql.compile; 23 24 import org.apache.derby.iapi.sql.compile.CostEstimate; 25 import org.apache.derby.iapi.sql.compile.JoinStrategy; 26 import org.apache.derby.iapi.sql.compile.OptimizableList; 27 import org.apache.derby.iapi.sql.compile.OptimizablePredicateList; 28 import org.apache.derby.iapi.sql.compile.Optimizer; 29 import org.apache.derby.iapi.sql.compile.OptimizerFactory; 30 import org.apache.derby.iapi.sql.compile.RequiredRowOrdering; 31 32 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext; 33 34 import org.apache.derby.iapi.store.access.TransactionController; 35 36 import org.apache.derby.iapi.sql.dictionary.DataDictionary; 37 38 import org.apache.derby.iapi.services.monitor.ModuleControl; 39 import org.apache.derby.iapi.services.context.ContextManager; 40 import org.apache.derby.iapi.services.property.PropertyUtil; 41 42 import org.apache.derby.iapi.services.sanity.SanityManager; 43 44 import org.apache.derby.iapi.error.StandardException; 45 46 import org.apache.derby.iapi.reference.Property; 47 48 import org.apache.derby.impl.sql.compile.OptimizerFactoryImpl; 49 50 import java.util.Properties ; 51 52 55 56 public class Level2OptimizerFactoryImpl 57 extends OptimizerFactoryImpl 58 { 59 60 64 public void boot(boolean create, Properties startParams) 65 throws StandardException 66 { 67 super.boot(create, startParams); 68 } 69 70 74 77 public boolean supportsOptimizerTrace() 78 { 79 return true; 80 } 81 82 public Level2OptimizerFactoryImpl() 86 { 87 } 88 89 protected Optimizer getOptimizerImpl( 90 OptimizableList optimizableList, 91 OptimizablePredicateList predList, 92 DataDictionary dDictionary, 93 RequiredRowOrdering requiredRowOrdering, 94 int numTablesInQuery, 95 LanguageConnectionContext lcc) 96 throws StandardException 97 { 98 99 return new Level2OptimizerImpl( 100 optimizableList, 101 predList, 102 dDictionary, 103 ruleBasedOptimization, 104 noTimeout, 105 useStatistics, 106 maxMemoryPerTable, 107 joinStrategySet, 108 lcc.getLockEscalationThreshold(), 109 requiredRowOrdering, 110 numTablesInQuery, 111 lcc); 112 } 113 114 119 public CostEstimate getCostEstimate() 120 throws StandardException 121 { 122 return new Level2CostEstimateImpl(); 123 } 124 } 125 126 | Popular Tags |