Top Description Constructors Methods
org.apache.derby.iapi.db

public Class OptimizerTrace

extends Object
Class Inheritance
Imports
java.io.PrintWriter, .StringWriter, java.sql.SQLException, org.apache.derby.iapi.sql.compile.OptTrace, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, .ConnectionUtil, org.apache.derby.impl.sql.compile.DefaultOptTrace

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static 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.
getOptimizerTraceOutput
()

Get the optimizer trace output for the last optimized query as a String.

public static OptTrace

Returns:

the optimizer tracer
getOptimizerTracer
()

Get the current optimizer tracer, if any.

public static void
setOptimizerTrace(boolean
Whether to turn optimizer tracing on (true) or off (false).
onOrOff
)

Turn default optimizer tracing on or off.

public static void
setOptimizerTracer(OptTrace
Null if tracing is being turned off, otherwise an optimizer tracer
tracer
)

Install an optimizer tracer (to enable tracing) or uninstall the current optimizer tracer (to disable tracing).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

OptimizerTraceback to summary
public OptimizerTrace()

Method Detail

getOptimizerTraceOutputback to summary
public static String getOptimizerTraceOutput()

Get the optimizer trace output for the last optimized query as a String.

Returns:String

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.

getOptimizerTracerback to summary
public static OptTrace getOptimizerTracer()

Get the current optimizer tracer, if any.

Returns:OptTrace

the optimizer tracer

setOptimizerTraceback to summary
public static void setOptimizerTrace(boolean onOrOff)

Turn default optimizer tracing on or off.

Parameters
onOrOff:boolean

Whether to turn optimizer tracing on (true) or off (false).

setOptimizerTracerback to summary
public static void setOptimizerTracer(OptTrace tracer)

Install an optimizer tracer (to enable tracing) or uninstall the current optimizer tracer (to disable tracing).

Parameters
tracer:OptTrace

Null if tracing is being turned off, otherwise an optimizer tracer