{
    "Plan" : {
        "Plans" : [
            {
                "PlanNodeId" : 6,
                "Plans" : [
                    {
                        "PlanNodeId" : 5,
                        "Plans" : [
                            {
                                "PlanNodeId" : 4,
                                "Plans" : [
                                    {
                                        "PlanNodeId" : 3,
                                        "Plans" : [
                                            {
                                                "PlanNodeId" : 2,
                                                "Plans" : [
                                                    {
                                                        "Tables" : [
                                                            "olap_yatests/clickbench/hits"
                                                        ],
                                                        "PlanNodeId" : 1,
                                                        "Operators" : [
                                                            {
                                                                "Inputs" : [
                                                                    {
                                                                        "InternalOperatorId" : 1
                                                                    }
                                                                ],
                                                                "GroupBy" : "[0,1,2,3,4]",
                                                                "Aggregation" : "",
                                                                "Name" : "Aggregate",
                                                                "Phase" : "Intermediate"
                                                            },
                                                            {
                                                                "Inputs" : [
                                                                    {
                                                                        "InternalOperatorId" : 2
                                                                    }
                                                                ],
                                                                "E-Rows" : "10000",
                                                                "Predicate" : "IsRefresh == 0",
                                                                "Pushdown" : "True",
                                                                "Name" : "Filter",
                                                                "E-Size" : "302153.0514",
                                                                "E-Cost" : "0"
                                                            },
                                                            {
                                                                "Scan" : "Parallel",
                                                                "E-Size" : "3021530.514",
                                                                "ReadRanges" : [
                                                                    "CounterID [62, 62]",
                                                                    "EventDate [15887, 15917]"
                                                                ],
                                                                "Name" : "TableRangeScan",
                                                                "Inputs" : [ ],
                                                                "Path" : "/local/test_db/olap_yatests/clickbench/hits",
                                                                "E-Rows" : "100000",
                                                                "Table" : "olap_yatests/clickbench/hits",
                                                                "ReadRangesKeys" : [
                                                                    "CounterID",
                                                                    "EventDate"
                                                                ],
                                                                "ReadColumns" : [
                                                                    "AdvEngineID",
                                                                    "IsRefresh",
                                                                    "Referer",
                                                                    "SearchEngineID",
                                                                    "TraficSourceID",
                                                                    "URL"
                                                                ],
                                                                "SsaProgram" : {
                                                                    "Command" : [
                                                                        {
                                                                            "Assign" : {
                                                                                "Constant" : {
                                                                                    "Int32" : 0
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 106
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 11,
                                                                                    "KernelIdx" : 0,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 16
                                                                                        },
                                                                                        {
                                                                                            "Id" : 106
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 107
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Filter" : {
                                                                                "Predicate" : {
                                                                                    "Id" : 107
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Projection" : {
                                                                                "Columns" : [
                                                                                    {
                                                                                        "Id" : 41
                                                                                    },
                                                                                    {
                                                                                        "Id" : 15
                                                                                    },
                                                                                    {
                                                                                        "Id" : 39
                                                                                    },
                                                                                    {
                                                                                        "Id" : 38
                                                                                    },
                                                                                    {
                                                                                        "Id" : 14
                                                                                    }
                                                                                ]
                                                                            }
                                                                        }
                                                                    ]
                                                                },
                                                                "E-Cost" : "0",
                                                                "ReadRangesExpectedSize" : 1
                                                            }
                                                        ],
                                                        "Node Type" : "Aggregate-Filter-TableRangeScan",
                                                        "Stats" : {
                                                            "UseLlvm" : "undefined",
                                                            "Output" : [
                                                                {
                                                                    "Pop" : { },
                                                                    "Name" : "3",
                                                                    "Push" : {
                                                                        "WaitTimeUs" : {
                                                                            "Count" : 3,
                                                                            "Sum" : 2117148,
                                                                            "Max" : 707775,
                                                                            "Min" : 702713,
                                                                            "History" : [
                                                                                367,
                                                                                789524,
                                                                                460,
                                                                                1060334,
                                                                                492,
                                                                                1416334,
                                                                                573,
                                                                                1550300,
                                                                                644,
                                                                                1783827,
                                                                                694,
                                                                                1964949,
                                                                                701,
                                                                                1990845,
                                                                                702,
                                                                                2031382,
                                                                                707,
                                                                                2065214,
                                                                                715,
                                                                                2085257,
                                                                                716,
                                                                                2102722,
                                                                                719,
                                                                                2105273,
                                                                                720,
                                                                                2117148
                                                                            ]
                                                                        }
                                                                    }
                                                                }
                                                            ],
                                                            "MaxMemoryUsage" : {
                                                                "Count" : 3,
                                                                "Sum" : 9633792,
                                                                "Max" : 3211264,
                                                                "Min" : 3211264,
                                                                "History" : [
                                                                    171,
                                                                    9633792,
                                                                    720,
                                                                    9633792
                                                                ]
                                                            },
                                                            "Tasks" : 3,
                                                            "FinishedTasks" : 3,
                                                            "PhysicalStageId" : 0,
                                                            "StageDurationUs" : 0,
                                                            "Table" : [
                                                                {
                                                                    "Path" : "/local/test_db/olap_yatests/clickbench/hits"
                                                                }
                                                            ],
                                                            "BaseTimeMs" : 1762353301427,
                                                            "CpuTimeUs" : {
                                                                "Count" : 3,
                                                                "Sum" : 21662,
                                                                "Max" : 15784,
                                                                "Min" : 2554,
                                                                "History" : [
                                                                    171,
                                                                    20215,
                                                                    367,
                                                                    20363,
                                                                    460,
                                                                    20438,
                                                                    492,
                                                                    20578,
                                                                    573,
                                                                    20670,
                                                                    644,
                                                                    20763,
                                                                    694,
                                                                    20870,
                                                                    701,
                                                                    20908,
                                                                    702,
                                                                    20942,
                                                                    707,
                                                                    20977,
                                                                    715,
                                                                    21127,
                                                                    716,
                                                                    21332,
                                                                    719,
                                                                    21393,
                                                                    720,
                                                                    21662
                                                                ]
                                                            },
                                                            "Ingress" : [
                                                                {
                                                                    "Pop" : { },
                                                                    "External" : { },
                                                                    "Name" : "CS",
                                                                    "Ingress" : { },
                                                                    "Push" : { }
                                                                }
                                                            ],
                                                            "UpdateTimeMs" : 718
                                                        }
                                                    }
                                                ],
                                                "HashFunc" : "HashV1",
                                                "Node Type" : "HashShuffle",
                                                "KeyColumns" : [
                                                    "AdvEngineID",
                                                    "Dst",
                                                    "SearchEngineID",
                                                    "Src",
                                                    "TraficSourceID"
                                                ],
                                                "PlanNodeType" : "Connection"
                                            }
                                        ],
                                        "Operators" : [
                                            {
                                                "Inputs" : [
                                                    {
                                                        "ExternalPlanNodeId" : 2
                                                    }
                                                ],
                                                "Name" : "TopSort",
                                                "Limit" : "10",
                                                "TopSortBy" : "argument.Count0"
                                            }
                                        ],
                                        "Node Type" : "TopSort",
                                        "Stats" : {
                                            "UseLlvm" : "undefined",
                                            "DurationUs" : {
                                                "Count" : 2,
                                                "Sum" : 2000,
                                                "Max" : 1000,
                                                "Min" : 1000
                                            },
                                            "Output" : [
                                                {
                                                    "Pop" : { },
                                                    "Name" : "5",
                                                    "Push" : {
                                                        "WaitTimeUs" : {
                                                            "Count" : 2,
                                                            "Sum" : 1413629,
                                                            "Max" : 706931,
                                                            "Min" : 706698,
                                                            "History" : [
                                                                716,
                                                                1409142,
                                                                720,
                                                                1413629
                                                            ]
                                                        }
                                                    }
                                                }
                                            ],
                                            "MaxMemoryUsage" : {
                                                "Count" : 2,
                                                "Sum" : 2228224,
                                                "Max" : 1114112,
                                                "Min" : 1114112,
                                                "History" : [
                                                    1,
                                                    1114112,
                                                    6,
                                                    2228224,
                                                    720,
                                                    2228224
                                                ]
                                            },
                                            "Tasks" : 2,
                                            "FinishedTasks" : 2,
                                            "PhysicalStageId" : 1,
                                            "StageDurationUs" : 1000,
                                            "BaseTimeMs" : 1762353301427,
                                            "CpuTimeUs" : {
                                                "Count" : 2,
                                                "Sum" : 2445,
                                                "Max" : 1343,
                                                "Min" : 1102,
                                                "History" : [
                                                    1,
                                                    1254,
                                                    6,
                                                    2283,
                                                    716,
                                                    2360,
                                                    720,
                                                    2445
                                                ]
                                            },
                                            "UpdateTimeMs" : 719,
                                            "Input" : [
                                                {
                                                    "Pop" : { },
                                                    "Name" : "1",
                                                    "Push" : {
                                                        "WaitTimeUs" : {
                                                            "Count" : 2,
                                                            "Sum" : 1433241,
                                                            "Max" : 716664,
                                                            "Min" : 716577,
                                                            "History" : [
                                                                716,
                                                                1430206,
                                                                720,
                                                                1433241
                                                            ]
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                ],
                                "Node Type" : "Merge",
                                "SortColumns" : [
                                    "Count0 (Desc)"
                                ],
                                "PlanNodeType" : "Connection"
                            }
                        ],
                        "Operators" : [
                            {
                                "Inputs" : [
                                    {
                                        "ExternalPlanNodeId" : 4
                                    }
                                ],
                                "Name" : "Limit",
                                "Limit" : "10"
                            }
                        ],
                        "Node Type" : "Limit",
                        "Stats" : {
                            "UseLlvm" : "undefined",
                            "Output" : [
                                {
                                    "Pop" : { },
                                    "Name" : "RESULT",
                                    "Push" : {
                                        "WaitTimeUs" : {
                                            "Count" : 1,
                                            "Sum" : 716807,
                                            "Max" : 716807,
                                            "Min" : 716807,
                                            "History" : [
                                                720,
                                                716807
                                            ]
                                        }
                                    }
                                }
                            ],
                            "MaxMemoryUsage" : {
                                "Count" : 1,
                                "Sum" : 65536,
                                "Max" : 65536,
                                "Min" : 65536,
                                "History" : [
                                    6,
                                    65536,
                                    720,
                                    65536
                                ]
                            },
                            "Tasks" : 1,
                            "FinishedTasks" : 1,
                            "PhysicalStageId" : 2,
                            "StageDurationUs" : 0,
                            "BaseTimeMs" : 1762353301427,
                            "CpuTimeUs" : {
                                "Count" : 1,
                                "Sum" : 546,
                                "Max" : 546,
                                "Min" : 546,
                                "History" : [
                                    6,
                                    521,
                                    719,
                                    543,
                                    720,
                                    546
                                ]
                            },
                            "UpdateTimeMs" : 720,
                            "Input" : [
                                {
                                    "Pop" : { },
                                    "Name" : "3",
                                    "Push" : {
                                        "WaitTimeUs" : {
                                            "Count" : 1,
                                            "Sum" : 358401,
                                            "Max" : 358401,
                                            "Min" : 358401,
                                            "History" : [
                                                719,
                                                358401,
                                                720,
                                                358401
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ],
                "Node Type" : "ResultSet_1",
                "PlanNodeType" : "ResultSet"
            }
        ],
        "Node Type" : "Query",
        "Stats" : {
            "Compilation" : {
                "FromCache" : false,
                "DurationUs" : 2040899,
                "CpuTimeUs" : 2022907
            },
            "ProcessCpuTimeUs" : 1538,
            "TotalDurationUs" : 2803403,
            "ResourcePoolId" : "default",
            "QueuedTimeUs" : 0
        },
        "PlanNodeType" : "Query"
    },
    "meta" : {
        "version" : "0.2",
        "type" : "query"
    },
    "SimplifiedPlan" : {
        "PlanNodeId" : 0,
        "Plans" : [
            {
                "PlanNodeId" : 1,
                "Plans" : [
                    {
                        "PlanNodeId" : 2,
                        "Plans" : [
                            {
                                "PlanNodeId" : 4,
                                "Plans" : [
                                    {
                                        "PlanNodeId" : 5,
                                        "Plans" : [
                                            {
                                                "PlanNodeId" : 6,
                                                "Plans" : [
                                                    {
                                                        "PlanNodeId" : 7,
                                                        "Plans" : [
                                                            {
                                                                "PlanNodeId" : 8,
                                                                "Operators" : [
                                                                    {
                                                                        "Scan" : "Parallel",
                                                                        "E-Size" : "3021530.514",
                                                                        "ReadRanges" : [
                                                                            "CounterID [62, 62]",
                                                                            "EventDate [15887, 15917]"
                                                                        ],
                                                                        "Name" : "TableRangeScan",
                                                                        "Path" : "/local/test_db/olap_yatests/clickbench/hits",
                                                                        "E-Rows" : "100000",
                                                                        "Table" : "olap_yatests/clickbench/hits",
                                                                        "ReadRangesKeys" : [
                                                                            "CounterID",
                                                                            "EventDate"
                                                                        ],
                                                                        "ReadColumns" : [
                                                                            "AdvEngineID",
                                                                            "IsRefresh",
                                                                            "Referer",
                                                                            "SearchEngineID",
                                                                            "TraficSourceID",
                                                                            "URL"
                                                                        ],
                                                                        "SsaProgram" : {
                                                                            "Command" : [
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Constant" : {
                                                                                            "Int32" : 0
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 106
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Function" : {
                                                                                            "YqlOperationId" : 11,
                                                                                            "KernelIdx" : 0,
                                                                                            "FunctionType" : 2,
                                                                                            "Arguments" : [
                                                                                                {
                                                                                                    "Id" : 16
                                                                                                },
                                                                                                {
                                                                                                    "Id" : 106
                                                                                                }
                                                                                            ]
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 107
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Filter" : {
                                                                                        "Predicate" : {
                                                                                            "Id" : 107
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Projection" : {
                                                                                        "Columns" : [
                                                                                            {
                                                                                                "Id" : 41
                                                                                            },
                                                                                            {
                                                                                                "Id" : 15
                                                                                            },
                                                                                            {
                                                                                                "Id" : 39
                                                                                            },
                                                                                            {
                                                                                                "Id" : 38
                                                                                            },
                                                                                            {
                                                                                                "Id" : 14
                                                                                            }
                                                                                        ]
                                                                                    }
                                                                                }
                                                                            ]
                                                                        },
                                                                        "E-Cost" : "0",
                                                                        "ReadRangesExpectedSize" : 1
                                                                    }
                                                                ],
                                                                "Node Type" : "TableRangeScan"
                                                            }
                                                        ],
                                                        "Operators" : [
                                                            {
                                                                "E-Rows" : "10000",
                                                                "Predicate" : "IsRefresh == 0",
                                                                "Pushdown" : "True",
                                                                "Name" : "Filter",
                                                                "E-Size" : "302153.0514",
                                                                "E-Cost" : "0"
                                                            }
                                                        ],
                                                        "Node Type" : "Filter"
                                                    }
                                                ],
                                                "Operators" : [
                                                    {
                                                        "GroupBy" : "[0,1,2,3,4]",
                                                        "A-SelfCpu" : 15.784,
                                                        "Aggregation" : "",
                                                        "A-Cpu" : 15.784,
                                                        "Name" : "Aggregate",
                                                        "Phase" : "Intermediate"
                                                    }
                                                ],
                                                "Node Type" : "Aggregate"
                                            }
                                        ],
                                        "Node Type" : "HashShuffle (KeyColumns: [\"AdvEngineID\",\"Dst\",\"SearchEngineID\",\"Src\",\"TraficSourceID\"], HashFunc: \"HashV1\")",
                                        "PlanNodeType" : "Connection"
                                    }
                                ],
                                "Operators" : [
                                    {
                                        "A-SelfCpu" : 1.343,
                                        "A-Cpu" : 17.127,
                                        "Name" : "TopSort",
                                        "Limit" : "10",
                                        "TopSortBy" : "argument.Count0"
                                    }
                                ],
                                "Node Type" : "TopSort"
                            }
                        ],
                        "Operators" : [
                            {
                                "A-SelfCpu" : 0.546,
                                "A-Cpu" : 17.673,
                                "Name" : "Limit",
                                "Limit" : "10"
                            }
                        ],
                        "Node Type" : "Limit"
                    }
                ],
                "Node Type" : "ResultSet_1",
                "PlanNodeType" : "ResultSet"
            }
        ],
        "Node Type" : "Query",
        "PlanNodeType" : "Query"
    }
}
