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
-

 

How you use the RUNTIMESTATISTICS attribute

  • To use the RUNTIMESTATISTICS attribute in ij, turn on and off RUNTIMESTATISTICS using the SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS() system procedure (see the Derby Reference Manual for more information):
    -- turn on RUNTIMESTATISTICS for connection:
    CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);
    -- execute complex query here -- step through the result set
    -- access runtime statistics information:
    VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
    CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0);
  • Turn on statistics timing using the SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING system procedure (see the Derby Reference Manual for more information). If you do not turn on statistics timing, you will see the statement execution plan only, and not the timing information.
    CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);
    CALL SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING(1);
Although the syntax is different, the basic steps for working with RUNTIMESTATISTICS are the same in a Java program.
If you are working in ij, set the display width to 5000 or another high number:
MaximumDisplayWidth 5000
 

javadb@jdbcurl.com