org.h2.command.dml
Class OptimizerHints

java.lang.Object
  extended by org.h2.command.dml.OptimizerHints

public class OptimizerHints
extends java.lang.Object

Thread local hints for H2 query optimizer. All the ongoing queries in the current thread will run with respect to these hints, so if they are needed only for a single operation it is preferable to setup and drop them in try-finally block. Currently works only in embedded mode.


Constructor Summary
OptimizerHints()
           
 
Method Summary
static OptimizerHints get()
          Get the current thread local hints or null if none.
 boolean getJoinReorderEnabled()
           
static void set(OptimizerHints hints)
          Set thread local hints or null to drop any existing hints.
 void setJoinReorderEnabled(boolean joinReorderEnabled)
          Set whether reordering of tables (or anything else in the FROM clause) is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptimizerHints

public OptimizerHints()
Method Detail

set

public static void set(OptimizerHints hints)
Set thread local hints or null to drop any existing hints.

Parameters:
hints - the hints

get

public static OptimizerHints get()
Get the current thread local hints or null if none.

Returns:
the hints

setJoinReorderEnabled

public void setJoinReorderEnabled(boolean joinReorderEnabled)
Set whether reordering of tables (or anything else in the FROM clause) is enabled. By default is true.

Parameters:
joinReorderEnabled - Flag value.

getJoinReorderEnabled

public boolean getJoinReorderEnabled()