Java Doc for Optimizer.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » sql » compile » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.iapi.sql.compile 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derby.iapi.sql.compile.Optimizer

All known Subclasses:   org.apache.derby.impl.sql.compile.OptimizerImpl,
Optimizer
public interface Optimizer (Code)
Optimizer provides services for optimizing a query. RESOLVE: o Need to figure out what to do about subqueries, figuring out their attachment points and how to communicate them back to the caller.


Field Summary
final public static  intADDING_UNORDERED_OPTIMIZABLE
    
final public static  intCALLING_NEXT_ACCESS_PATH
    
final public static  intCALLING_ON_JOIN_NODE
    
final public static  intCHANGING_ACCESS_PATH_FOR_TABLE
    
final public static  intCHEAPEST_PLAN_SO_FAR
    
final public static  intCOMPLETE_JOIN_ORDER
    
final public static  intCOMPOSITE_SEL_FROM_STATS
    
final public static  intCONSIDERING_CONGLOMERATE
    
final public static  intCONSIDERING_JOIN_ORDER
    
final public static  intCONSIDERING_JOIN_STRATEGY
    
final public static  intCOST_INCLUDING_COMPOSITE_SEL_FROM_STATS
    
final public static  intCOST_INCLUDING_EXTRA_1ST_COL_SELECTIVITY
    
final public static  intCOST_INCLUDING_EXTRA_NONQUALIFIER_SELECTIVITY
    
final public static  intCOST_INCLUDING_EXTRA_QUALIFIER_SELECTIVITY
    
final public static  intCOST_INCLUDING_EXTRA_START_STOP
    
final public static  intCOST_INCLUDING_STATS_FOR_INDEX
    
final public static  intCOST_OF_CHEAPEST_PLAN_SO_FAR
    
final public static  intCOST_OF_CONGLOMERATE_SCAN1
    
final public static  intCOST_OF_CONGLOMERATE_SCAN2
    
final public static  intCOST_OF_CONGLOMERATE_SCAN3
    
final public static  intCOST_OF_CONGLOMERATE_SCAN4
    
final public static  intCOST_OF_CONGLOMERATE_SCAN5
    
final public static  intCOST_OF_CONGLOMERATE_SCAN6
    
final public static  intCOST_OF_CONGLOMERATE_SCAN7
    
final public static  intCOST_OF_NONCOVERING_INDEX
    
final public static  intCOST_OF_N_SCANS
    
final public static  intCOST_OF_SORTING
    
final public static  intCURRENT_PLAN_IS_SA_PLAN
    
final public static  intESTIMATING_COST_OF_CONGLOMERATE
    
final public static  intHJ_HASH_KEY_COLUMNS
    
final public static  intHJ_SKIP_NOT_MATERIALIZABLE
    
final public static  intHJ_SKIP_NO_JOIN_COLUMNS
    
final public static  intILLEGAL_USER_JOIN_ORDER
    
 StringJOIN_ORDER_OPTIMIZATION
     Property name for controlling whether to do join order optimization.
final public static  intLOOKING_FOR_SPECIFIED_INDEX
    
final public static  intMATCH_SINGLE_ROW_COST
    
 intMAX_DYNAMIC_MATERIALIZED_ROWS
     Maximum size of dynamically created materialized rows.
 StringMAX_MEMORY_PER_TABLE
     Property name for controlling the maximum size of memory (in KB) the optimizer can use for each table.
final public static  intMODIFYING_ACCESS_PATHS
    
 StringMODULE
     Module name for the monitor's module locating system.
final public static  intNON_COVERING_INDEX_COST
    
 intNORMAL_PLAN
    
final public static  intNO_BEST_PLAN
    
final public static  intNO_MORE_CONGLOMERATES
    
final public static  intNO_TABLES
    
 StringNO_TIMEOUT
     Property name for controlling whether the optimizer ever times out while optimizing a query and goes with the best plan so far.
final public static  intPLAN_TYPE
    
final public static  intREMEMBERING_BEST_ACCESS_PATH
    
final public static  intREMEMBERING_BEST_ACCESS_PATH_SUBSTRING
    
final public static  intREMEMBERING_BEST_JOIN_ORDER
    
final public static  intREMEMBERING_BEST_SORT_AVOIDANCE_ACCESS_PATH_SUBSTRING
    
final public static  intREMEMBERING_BEST_UNKNOWN_ACCESS_PATH_SUBSTRING
    
final public static  intREMEMBERING_JOIN_STRATEGY
    
final public static  intROW_LOCK_ALL_CONSTANT_START_STOP
    
final public static  intROW_LOCK_UNDER_THRESHOLD
    
 StringRULE_BASED_OPTIMIZATION
     Property name for controlling whether to do rule-based optimization, as opposed to cost-based optimization.
final public static  intSCANNING_HEAP_FULL_MATCH_ON_UNIQUE_KEY
    
final public static  intSHORT_CIRCUITING
    
final public static  intSKIPPING_DUE_TO_EXCESS_MEMORY
    
final public static  intSKIPPING_JOIN_ORDER
    
 intSORT_AVOIDANCE_PLAN
    
final public static  intSORT_NEEDED_FOR_ORDERING
    
final public static  intSTARTED
    
final public static  intTABLE_LOCK_NO_START_STOP
    
final public static  intTABLE_LOCK_OVER_THRESHOLD
    
final public static  intTIME_EXCEEDED
    
final public static  intTOTAL_COST_NON_SA_PLAN
    
final public static  intTOTAL_COST_SA_PLAN
    
final public static  intTOTAL_COST_WITH_SORTING
    
final public static  intUSER_JOIN_ORDER_OPTIMIZED
    
 StringUSE_STATISTICS
     Property name for disabling statistics use for all queries.


Method Summary
public  voidconsiderCost(Optimizable optimizable, OptimizablePredicateList predList, CostEstimate estimatedCost, CostEstimate outerCost)
     Consider the cost of the given optimizable.
public  voidcostOptimizable(Optimizable optimizable, TableDescriptor td, ConglomerateDescriptor cd, OptimizablePredicateList predList, CostEstimate outerCost)
     Cost the current Optimizable with the specified OPL.
public  voidcostPermutation()
     Cost the current permutation.
public  DataDictionarygetDataDictionary()
     Return the DataDictionary that the Optimizer is using.
public  CostEstimategetFinalCost()
     Get the final estimated cost of the optimized query.
 JoinStrategygetJoinStrategy(int whichStrategy)
     Gets a join strategy by number (zero-based).
 JoinStrategygetJoinStrategy(String whichStrategy)
     Gets a join strategy by name.
public  intgetLevel()
     Get the level of this optimizer.
public  intgetMaxMemoryPerTable()
    
public  booleangetNextDecoratedPermutation()
     Iterate through the "decorated permutations", returning false when they are exhausted.
public  booleangetNextPermutation()
     Iterate through the permutations, returning false when the permutations are exhausted.
public  intgetNumberOfJoinStrategies()
     Get the number of join strategies supported by this optimizer.
public  CostEstimategetOptimizedCost()
    
public  voidmodifyAccessPaths()
     Modify the access path for each Optimizable, as necessary.
public  CostEstimatenewCostEstimate()
    
public  voidprepForNextRound()
     Prepare for another round of optimization. This method is called before every "round" of optimization, where we define a "round" to be the period between the last time a call to getOptimizer() (on either a ResultSetNode or an OptimizerFactory) returned _this_ Optimizer and the time a call to this Optimizer's getNextPermutation() method returns FALSE.
public  voidsetOuterRows(double outerRowCount)
     Set the estimated number of outer rows - good for optimizing nested optimizables like subqueries and join nodes.
public  inttableLockThreshold()
     Get the maximum number of estimated rows touched in a table before we decide to open the table with table locking (as opposed to row locking.
public  voidtrace(int traceFlag, int intParam1, int intParam2, double doubleParam, Object objectParam1)
     Optimizer trace.
 doubleuniqueJoinWithOuterTable(OptimizablePredicateList predList)
     Tells whether any of the tables outer to the current one has a uniqueness condition on the given predicate list, and if so, how many times each unique key can be seen by the current table.
Parameters:
  predList - The predicate list to check <= 0 means there is no uniqueness condition> 0 means there is a uniqueness condition on anouter table, and the return value is the reciprocal ofthe maximum number of times the optimizer estimates that eachunique key will be returned.
public  booleanuseStatistics()
     If statistics should be considered by the optimizer while optimizing a query.

Field Detail
ADDING_UNORDERED_OPTIMIZABLE
final public static int ADDING_UNORDERED_OPTIMIZABLE(Code)



CALLING_NEXT_ACCESS_PATH
final public static int CALLING_NEXT_ACCESS_PATH(Code)



CALLING_ON_JOIN_NODE
final public static int CALLING_ON_JOIN_NODE(Code)



CHANGING_ACCESS_PATH_FOR_TABLE
final public static int CHANGING_ACCESS_PATH_FOR_TABLE(Code)



CHEAPEST_PLAN_SO_FAR
final public static int CHEAPEST_PLAN_SO_FAR(Code)



COMPLETE_JOIN_ORDER
final public static int COMPLETE_JOIN_ORDER(Code)



COMPOSITE_SEL_FROM_STATS
final public static int COMPOSITE_SEL_FROM_STATS(Code)



CONSIDERING_CONGLOMERATE
final public static int CONSIDERING_CONGLOMERATE(Code)



CONSIDERING_JOIN_ORDER
final public static int CONSIDERING_JOIN_ORDER(Code)



CONSIDERING_JOIN_STRATEGY
final public static int CONSIDERING_JOIN_STRATEGY(Code)



COST_INCLUDING_COMPOSITE_SEL_FROM_STATS
final public static int COST_INCLUDING_COMPOSITE_SEL_FROM_STATS(Code)



COST_INCLUDING_EXTRA_1ST_COL_SELECTIVITY
final public static int COST_INCLUDING_EXTRA_1ST_COL_SELECTIVITY(Code)



COST_INCLUDING_EXTRA_NONQUALIFIER_SELECTIVITY
final public static int COST_INCLUDING_EXTRA_NONQUALIFIER_SELECTIVITY(Code)



COST_INCLUDING_EXTRA_QUALIFIER_SELECTIVITY
final public static int COST_INCLUDING_EXTRA_QUALIFIER_SELECTIVITY(Code)



COST_INCLUDING_EXTRA_START_STOP
final public static int COST_INCLUDING_EXTRA_START_STOP(Code)



COST_INCLUDING_STATS_FOR_INDEX
final public static int COST_INCLUDING_STATS_FOR_INDEX(Code)



COST_OF_CHEAPEST_PLAN_SO_FAR
final public static int COST_OF_CHEAPEST_PLAN_SO_FAR(Code)



COST_OF_CONGLOMERATE_SCAN1
final public static int COST_OF_CONGLOMERATE_SCAN1(Code)



COST_OF_CONGLOMERATE_SCAN2
final public static int COST_OF_CONGLOMERATE_SCAN2(Code)



COST_OF_CONGLOMERATE_SCAN3
final public static int COST_OF_CONGLOMERATE_SCAN3(Code)



COST_OF_CONGLOMERATE_SCAN4
final public static int COST_OF_CONGLOMERATE_SCAN4(Code)



COST_OF_CONGLOMERATE_SCAN5
final public static int COST_OF_CONGLOMERATE_SCAN5(Code)



COST_OF_CONGLOMERATE_SCAN6
final public static int COST_OF_CONGLOMERATE_SCAN6(Code)



COST_OF_CONGLOMERATE_SCAN7
final public static int COST_OF_CONGLOMERATE_SCAN7(Code)



COST_OF_NONCOVERING_INDEX
final public static int COST_OF_NONCOVERING_INDEX(Code)



COST_OF_N_SCANS
final public static int COST_OF_N_SCANS(Code)



COST_OF_SORTING
final public static int COST_OF_SORTING(Code)



CURRENT_PLAN_IS_SA_PLAN
final public static int CURRENT_PLAN_IS_SA_PLAN(Code)



ESTIMATING_COST_OF_CONGLOMERATE
final public static int ESTIMATING_COST_OF_CONGLOMERATE(Code)



HJ_HASH_KEY_COLUMNS
final public static int HJ_HASH_KEY_COLUMNS(Code)



HJ_SKIP_NOT_MATERIALIZABLE
final public static int HJ_SKIP_NOT_MATERIALIZABLE(Code)



HJ_SKIP_NO_JOIN_COLUMNS
final public static int HJ_SKIP_NO_JOIN_COLUMNS(Code)



ILLEGAL_USER_JOIN_ORDER
final public static int ILLEGAL_USER_JOIN_ORDER(Code)



JOIN_ORDER_OPTIMIZATION
String JOIN_ORDER_OPTIMIZATION(Code)
Property name for controlling whether to do join order optimization.



LOOKING_FOR_SPECIFIED_INDEX
final public static int LOOKING_FOR_SPECIFIED_INDEX(Code)



MATCH_SINGLE_ROW_COST
final public static int MATCH_SINGLE_ROW_COST(Code)



MAX_DYNAMIC_MATERIALIZED_ROWS
int MAX_DYNAMIC_MATERIALIZED_ROWS(Code)
Maximum size of dynamically created materialized rows. Caching large results use lot of memory and can cause stack overflow. See DERBY-634



MAX_MEMORY_PER_TABLE
String MAX_MEMORY_PER_TABLE(Code)
Property name for controlling the maximum size of memory (in KB) the optimizer can use for each table. If an access path takes memory larger than that size for a table, the access path is skipped. Default is 1024 (KB).



MODIFYING_ACCESS_PATHS
final public static int MODIFYING_ACCESS_PATHS(Code)



MODULE
String MODULE(Code)
Module name for the monitor's module locating system.



NON_COVERING_INDEX_COST
final public static int NON_COVERING_INDEX_COST(Code)



NORMAL_PLAN
int NORMAL_PLAN(Code)
Indicates a "normal" plan that is not optimized to do sort avoidance



NO_BEST_PLAN
final public static int NO_BEST_PLAN(Code)



NO_MORE_CONGLOMERATES
final public static int NO_MORE_CONGLOMERATES(Code)



NO_TABLES
final public static int NO_TABLES(Code)



NO_TIMEOUT
String NO_TIMEOUT(Code)
Property name for controlling whether the optimizer ever times out while optimizing a query and goes with the best plan so far.



PLAN_TYPE
final public static int PLAN_TYPE(Code)



REMEMBERING_BEST_ACCESS_PATH
final public static int REMEMBERING_BEST_ACCESS_PATH(Code)



REMEMBERING_BEST_ACCESS_PATH_SUBSTRING
final public static int REMEMBERING_BEST_ACCESS_PATH_SUBSTRING(Code)



REMEMBERING_BEST_JOIN_ORDER
final public static int REMEMBERING_BEST_JOIN_ORDER(Code)



REMEMBERING_BEST_SORT_AVOIDANCE_ACCESS_PATH_SUBSTRING
final public static int REMEMBERING_BEST_SORT_AVOIDANCE_ACCESS_PATH_SUBSTRING(Code)



REMEMBERING_BEST_UNKNOWN_ACCESS_PATH_SUBSTRING
final public static int REMEMBERING_BEST_UNKNOWN_ACCESS_PATH_SUBSTRING(Code)



REMEMBERING_JOIN_STRATEGY
final public static int REMEMBERING_JOIN_STRATEGY(Code)



ROW_LOCK_ALL_CONSTANT_START_STOP
final public static int ROW_LOCK_ALL_CONSTANT_START_STOP(Code)



ROW_LOCK_UNDER_THRESHOLD
final public static int ROW_LOCK_UNDER_THRESHOLD(Code)



RULE_BASED_OPTIMIZATION
String RULE_BASED_OPTIMIZATION(Code)
Property name for controlling whether to do rule-based optimization, as opposed to cost-based optimization.



SCANNING_HEAP_FULL_MATCH_ON_UNIQUE_KEY
final public static int SCANNING_HEAP_FULL_MATCH_ON_UNIQUE_KEY(Code)



SHORT_CIRCUITING
final public static int SHORT_CIRCUITING(Code)



SKIPPING_DUE_TO_EXCESS_MEMORY
final public static int SKIPPING_DUE_TO_EXCESS_MEMORY(Code)



SKIPPING_JOIN_ORDER
final public static int SKIPPING_JOIN_ORDER(Code)



SORT_AVOIDANCE_PLAN
int SORT_AVOIDANCE_PLAN(Code)
Indicates a sort-avoidance plan



SORT_NEEDED_FOR_ORDERING
final public static int SORT_NEEDED_FOR_ORDERING(Code)



STARTED
final public static int STARTED(Code)



TABLE_LOCK_NO_START_STOP
final public static int TABLE_LOCK_NO_START_STOP(Code)



TABLE_LOCK_OVER_THRESHOLD
final public static int TABLE_LOCK_OVER_THRESHOLD(Code)



TIME_EXCEEDED
final public static int TIME_EXCEEDED(Code)



TOTAL_COST_NON_SA_PLAN
final public static int TOTAL_COST_NON_SA_PLAN(Code)



TOTAL_COST_SA_PLAN
final public static int TOTAL_COST_SA_PLAN(Code)



TOTAL_COST_WITH_SORTING
final public static int TOTAL_COST_WITH_SORTING(Code)



USER_JOIN_ORDER_OPTIMIZED
final public static int USER_JOIN_ORDER_OPTIMIZED(Code)



USE_STATISTICS
String USE_STATISTICS(Code)
Property name for disabling statistics use for all queries.





Method Detail
considerCost
public void considerCost(Optimizable optimizable, OptimizablePredicateList predList, CostEstimate estimatedCost, CostEstimate outerCost) throws StandardException(Code)
Consider the cost of the given optimizable. This method is like costOptimizable, above, but it is used when the Optimizable does not need help from the optimizer in costing the Optimizable (in practice, all Optimizables except FromBaseTable use this method. Caller is responsible for pushing all predicates which can be evaluated prior to costing.
Parameters:
  optimizable - The Optimizable
Parameters:
  predList - The OptimizablePredicateList to apply
Parameters:
  estimatedCost - The estimated cost of the given optimizable
Parameters:
  outerCost - The cost of the tables outer to the one beingoptimizer - tells how many outer rows there are.
exception:
  StandardException - Thrown on error



costOptimizable
public void costOptimizable(Optimizable optimizable, TableDescriptor td, ConglomerateDescriptor cd, OptimizablePredicateList predList, CostEstimate outerCost) throws StandardException(Code)
Cost the current Optimizable with the specified OPL. Caller is responsible for pushing all predicates which can be evaluated prior to costing.
Parameters:
  optimizable - The Optimizable
Parameters:
  td - TableDescriptor of the Optimizable
Parameters:
  cd - The ConglomerateDescriptor for the conglom to cost(This should change to an object to representaccess paths, but for now this is OK).
Parameters:
  predList - The OptimizablePredicateList to apply
Parameters:
  outerCost - The cost of the tables outer to the one beingoptimizer - tells how many outer rows there are.
exception:
  StandardException - Thrown on error



costPermutation
public void costPermutation() throws StandardException(Code)
Cost the current permutation. Caller is responsible for pushing all predicates which can be evaluated prior to costing.
exception:
  StandardException - Thrown on error



getDataDictionary
public DataDictionary getDataDictionary()(Code)
Return the DataDictionary that the Optimizer is using. This is useful when an Optimizable needs to call optimize() on a child ResultSetNode. DataDictionary DataDictionary that the Optimizer is using.



getFinalCost
public CostEstimate getFinalCost()(Code)
Get the final estimated cost of the optimized query. This should be the cost that corresponds to the best overall join order chosen by the optimizer, and thus this method should only be called after optimization is complete (i.e. when modifying access paths).



getJoinStrategy
JoinStrategy getJoinStrategy(int whichStrategy)(Code)
Gets a join strategy by number (zero-based).



getJoinStrategy
JoinStrategy getJoinStrategy(String whichStrategy)(Code)
Gets a join strategy by name. Returns null if not found. The look-up is case-insensitive.



getLevel
public int getLevel()(Code)
Get the level of this optimizer. The level of this optimizer.



getMaxMemoryPerTable
public int getMaxMemoryPerTable()(Code)
the maximum number of bytes to be used per table.



getNextDecoratedPermutation
public boolean getNextDecoratedPermutation() throws StandardException(Code)
Iterate through the "decorated permutations", returning false when they are exhausted. NOTE - Implementers are responsible for hiding tree pruning of access methods behind this method call. boolean True - An optimizable decorated permutation remains.False - Decorated permutations are exhausted.
exception:
  StandardException - Thrown on error



getNextPermutation
public boolean getNextPermutation() throws StandardException(Code)
Iterate through the permutations, returning false when the permutations are exhausted. NOTE - Implementers are responsible for hiding tree pruning of permutations behind this method call. boolean True - An optimizable permutation remains.False - Permutations are exhausted.
exception:
  StandardException - Thrown on error



getNumberOfJoinStrategies
public int getNumberOfJoinStrategies()(Code)
Get the number of join strategies supported by this optimizer.



getOptimizedCost
public CostEstimate getOptimizedCost()(Code)
Get the estimated cost of the optimized query



modifyAccessPaths
public void modifyAccessPaths() throws StandardException(Code)
Modify the access path for each Optimizable, as necessary. This includes things like adding result sets to translate from index rows to base rows.
exception:
  StandardException - Thrown on error



newCostEstimate
public CostEstimate newCostEstimate()(Code)
Get a new CostEstimate object



prepForNextRound
public void prepForNextRound()(Code)
Prepare for another round of optimization. This method is called before every "round" of optimization, where we define a "round" to be the period between the last time a call to getOptimizer() (on either a ResultSetNode or an OptimizerFactory) returned _this_ Optimizer and the time a call to this Optimizer's getNextPermutation() method returns FALSE. Any re-initialization of state that is required before each round should be done in this method.



setOuterRows
public void setOuterRows(double outerRowCount)(Code)
Set the estimated number of outer rows - good for optimizing nested optimizables like subqueries and join nodes.



tableLockThreshold
public int tableLockThreshold()(Code)
Get the maximum number of estimated rows touched in a table before we decide to open the table with table locking (as opposed to row locking.



trace
public void trace(int traceFlag, int intParam1, int intParam2, double doubleParam, Object objectParam1)(Code)
Optimizer trace.



uniqueJoinWithOuterTable
double uniqueJoinWithOuterTable(OptimizablePredicateList predList) throws StandardException(Code)
Tells whether any of the tables outer to the current one has a uniqueness condition on the given predicate list, and if so, how many times each unique key can be seen by the current table.
Parameters:
  predList - The predicate list to check <= 0 means there is no uniqueness condition> 0 means there is a uniqueness condition on anouter table, and the return value is the reciprocal ofthe maximum number of times the optimizer estimates that eachunique key will be returned. For example, 0.5 means theoptimizer thinks each distinct join key will be returnedat most twice.
exception:
  StandardException - Thrown on error



useStatistics
public boolean useStatistics()(Code)
If statistics should be considered by the optimizer while optimizing a query. The user may disable the use of statistics by setting the property derby.optimizer.useStatistics or by using the property useStatistics in a query.
See Also:   Optimizer.USE_STATISTICS



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.