Package com.mongodb

Enum Class ExplainVerbosity

java.lang.Object
java.lang.Enum<ExplainVerbosity>
com.mongodb.ExplainVerbosity
All Implemented Interfaces:
Serializable, Comparable<ExplainVerbosity>, java.lang.constant.Constable

public enum ExplainVerbosity extends Enum<ExplainVerbosity>
An enumeration of the verbosity levels available for explaining query execution.
Since:
3.0
Since server release
3.0
  • Enum Constant Details

    • 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 Details

    • values

      public static ExplainVerbosity[] 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 ExplainVerbosity 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