Package com.mongodb
Enum ExplainVerbosity
- java.lang.Object
-
- java.lang.Enum<ExplainVerbosity>
-
- com.mongodb.ExplainVerbosity
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ExplainVerbosity>
public enum ExplainVerbosity extends java.lang.Enum<ExplainVerbosity>
An enumeration of the verbosity levels available for explaining query execution.- Since:
- 3.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL_PLANS_EXECUTIONS
Runs the query optimizer and chooses the winning plan, but then runs all generated plans to completion.EXECUTION_STATS
Runs the query optimizer, and then runs the winning plan to completion.QUERY_PLANNER
Runs the query planner and chooses the winning plan, but does not actually execute it.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExplainVerbosity
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ExplainVerbosity[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
QUERY_PLANNER
public static final ExplainVerbosity QUERY_PLANNER
Runs the query planner and chooses the winning plan, but does not actually execute it. The use case for this verbosity level is "Which plan will MongoDB choose to run my query."
-
EXECUTION_STATS
public static final ExplainVerbosity EXECUTION_STATS
Runs the query optimizer, and then runs the winning plan to completion. In addition to the planner information, this makes execution stats available. The use case for this verbosity level is "Is my query performing well."
-
ALL_PLANS_EXECUTIONS
public static final ExplainVerbosity ALL_PLANS_EXECUTIONS
Runs the query optimizer and chooses the winning plan, but then runs all generated plans to completion. This makes execution stats available for all of the query plans. The use case for this verbosity level is "I have a problem with this query, and I want as much information as possible in order to diagnose why it might be slow."
-
-
Method Detail
-
values
public static ExplainVerbosity[] 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 (ExplainVerbosity c : ExplainVerbosity.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ExplainVerbosity 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
-
-