Package com.complexible.stardog
Enum QueryPlanReuse
- java.lang.Object
-
- java.lang.Enum<QueryPlanReuse>
-
- com.complexible.stardog.QueryPlanReuse
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<QueryPlanReuse>
public enum QueryPlanReuse extends java.lang.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
-
-
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static QueryPlanReuse
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static QueryPlanReuse[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static QueryPlanReuse[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (QueryPlanReuse c : QueryPlanReuse.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static QueryPlanReuse valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-