Package com.complexible.stardog

# Enum Class QueryPlanReuse

java.lang.Object
java.lang.Enum<QueryPlanReuse>
com.complexible.stardog.QueryPlanReuse

All Implemented Interfaces:
  `Serializable`, `Comparable<QueryPlanReuse>`, `Constable`

public enum QueryPlanReuse extends Enum<QueryPlanReuse>
Options for configuring how Stardog will reuse query plans. Stardog answers queries by first generating an execution plan. Generating an optimal query plan is hard and time-consuming so these plans are cached and reused for structurally equivalent queries; i.e. queries such that one can be transformed into another by replacing constants. This enumeration defines different conditions under which a cached plan will be reused.

Since:
  4.0.5
Version:
  4.0.5
Author:
  Evren Sirin

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ALWAYS`
  Always reuse cached query plans for structurally equivalent queries.
  `CARDINALITY`
  Reuse cached query plans for structurally equivalent queries if the cardinality estimations of scans are similar.
  `NEVER`
  Never reuse cached query plans.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static QueryPlanReuse`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static QueryPlanReuse[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### ALWAYS

    public static final QueryPlanReuse ALWAYS
    Always reuse cached query plans for structurally equivalent queries.

  - ### NEVER

    public static final QueryPlanReuse NEVER
    Never reuse cached query plans. This strategy degrades query answering performance significantly and should not be used except for debugging purposes.

  - ### CARDINALITY

    public static final QueryPlanReuse CARDINALITY
    Reuse cached query plans for structurally equivalent queries if the cardinality estimations of scans are similar. This option is useful if the queries to a database involve constants with very different selectivities. If cached plans are always reused then the first query plan that is cached will be reused for all other queries that might not be optimal. Checking cardinality estimations first avoids this problem but introduces some slight overhead for query answering.

- ## Method Details

  - ### values

    public static QueryPlanReuse[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static QueryPlanReuse valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null