Java DB

Apache Derby

Derby Performance Tuning

Derby Getting Started
Derby Reference Manual
Derby Developer's Guide
Derby Performance Tuning
Derby Server and Admin Guide
Derby Tools and Utilities
Derby Performance Tuning
-Performance tips and tricks
-Tuning databases and applications
-DML statements and performance
-Performance and optimization
-Locking and performance
-Non-cost-based optimizations
-Overriding the default optimizer behavior
-Selectivity and cardinality statistics
-Internal language transformations
-Predicate transformations
-Transitive closure
-View transformations
-Subquery processing and transformations
-Outer join transformations
-Sort avoidance
-Aggregate processing
-

 

Transitive closure on join clauses

When a join statement selects from three or more tables, Derby analyzes any equijoin predicates between simple column references within each query block and adds additional equijoin predicates where possible if they do not currently exist. For example, Derby transforms the following query:
SELECT * FROM samp.employee e, samp.emp_act a, samp.emp_resume r
WHERE e.empno = a.empno
and a.empno = r.empno
into the following:
SELECT * FROM samp.employee e, samp.emp_act a, samp.emp_resume r
WHERE e.empno = a.empno
and a.empno = r.empno
and e.empno = r.empno

On the other hand, the optimizer knows that one of these equijoin predicates is redundant and will throw out the one that is least useful for optimization.

 

javadb@jdbcurl.com