Type alias ExplainPlan

ExplainPlan: {
    collections: {
        name: string;
        type: "read" | "write";
    }[];
    estimatedCost: number;
    estimatedNrItems: number;
    isModificationQuery: boolean;
    nodes: {
        dependencies: number[];
        estimatedCost: number;
        estimatedNrItems: number;
        id: number;
        type: string;
        [key: string]: any;
    }[];
    rules: string[];
    variables: {
        id: number;
        name: string;
    }[];
}

Plan explaining query execution.

Type declaration

  • collections: {
        name: string;
        type: "read" | "write";
    }[]

    Information about collections involved in the query.

  • estimatedCost: number

    Total estimated cost of the plan.

  • estimatedNrItems: number

    Estimated number of items returned by the query.

  • isModificationQuery: boolean

    Whether the query is a data modification query.

  • nodes: {
        dependencies: number[];
        estimatedCost: number;
        estimatedNrItems: number;
        id: number;
        type: string;
        [key: string]: any;
    }[]

    Execution nodes in this plan.

  • rules: string[]

    Rules applied by the optimizer.

  • variables: {
        id: number;
        name: string;
    }[]

    Variables used in the query.