Class OptimizerTrace


  • public class OptimizerTrace
    extends java.lang.Object

    This class provides static methods for controlling the optimizer tracing in a Derby database.

    • Constructor Summary

      Constructors 
      Constructor Description
      OptimizerTrace()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getOptimizerTraceOutput()
      Get the optimizer trace output for the last optimized query as a String.
      static OptTrace getOptimizerTracer()
      Get the current optimizer tracer, if any.
      static void setOptimizerTrace​(boolean onOrOff)
      Turn default optimizer tracing on or off.
      static void setOptimizerTracer​(OptTrace tracer)
      Install an optimizer tracer (to enable tracing) or uninstall the current optimizer tracer (to disable tracing).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OptimizerTrace

        public OptimizerTrace()
    • Method Detail

      • setOptimizerTrace

        public static void setOptimizerTrace​(boolean onOrOff)
        Turn default optimizer tracing on or off.
        Parameters:
        onOrOff - Whether to turn optimizer tracing on (true) or off (false).
      • setOptimizerTracer

        public static void setOptimizerTracer​(OptTrace tracer)
        Install an optimizer tracer (to enable tracing) or uninstall the current optimizer tracer (to disable tracing).
        Parameters:
        tracer - Null if tracing is being turned off, otherwise an optimizer tracer
      • getOptimizerTracer

        public static OptTrace getOptimizerTracer()
        Get the current optimizer tracer, if any.
      • getOptimizerTraceOutput

        public static java.lang.String getOptimizerTraceOutput()
        Get the optimizer trace output for the last optimized query as a String.
        Returns:
        The optimizer trace output for the last optimized query as a String. Null will be returned if optimizer trace output is off or not supported or no trace output was found or an exception occurred.