Details
Description
PreparedStatements could take much longer than Statements because of incorrect search clause transitive closure optimization. For the customer case I investigated this problem, Statement would complete in about 13 seconds, where as equivalent PreparedStatement ran "forever". (stoped it after hours)
I think there a problem with PredicateList.searchClauseTransitiveClosure method. This method tries to add new search clauses based on equality join between tables involved. Current code only looks for ConstantNodes on the right side of searchClauses. This would miss ParameterNodes, so Derby might miss search clause transitive closure optimizations for PreparedStatements.
Attachments
Attachments
Issue Links
- incorporates
-
DERBY-824 Enhance logic in PredicateList to use variant type of expression while determining search clauses or predicates, instead of using ConstantNode or ParameterNodes directly.
- Open
1.
|
Clean up coding error in searchClauseTransitiveClosure method in PredicateList.java | Closed | Unassigned |