Package com.mongodb

Enum ExplainVerbosity

    • 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​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null