Interface Plan

All Known Subinterfaces:
ProfiledPlan
All Known Implementing Classes:
InternalPlan, InternalProfiledPlan

@Immutable public interface Plan
This describes the plan that the database planner produced and used (or will use) to execute your query. This can be extremely helpful in understanding what a query is doing, and how to optimize it. For more details, see the Neo4j Manual.

The plan for the query is a tree of plans - each subtree containing zero or more child plans. The query starts with the root plan. Each sub-plan is of a specific operator type, which describes what that part of the plan does - for instance, perform an index lookup or filter results. The Neo4j Manual contains a reference of the available operator types, and these may differ across Neo4j versions.

For a simple view of a plan, the toString method will give a human-readable rendering of the tree.

Since:
1.0
  • Method Details

    • operatorType

      String operatorType()
      Returns:
      the operation this plan is performing.
    • arguments

      Map<String,Value> arguments()
      Many operators have arguments defining their specific behavior. This map contains those arguments.
      Returns:
      the arguments for the operator used.
    • identifiers

      List<String> identifiers()
      Identifiers used by this part of the plan. These can be both identifiers introduce by you, or automatically generated identifiers.
      Returns:
      a list of identifiers used by this plan.
    • children

      List<? extends Plan> children()
      As noted in the class-level javadoc, a plan is a tree, where each child is another plan. The children are where this part of the plan gets its input records - unless this is an operator that introduces new records on its own.
      Returns:
      zero or more child plans.