@zhou, thank you the follow up!
Please find the output below:
(sorry for the long post, but the forum does not allow attaching any files but the images)
{
“profile”:[
{
“executor”:“Project”,
“out”:[
{
“alias”:"",
“projection”:“remote_0.RegisteredOn”
},
{
“alias”:“count”,
“projection”:“CAST(COALESCE($0,0) AS SIGNED)”
}
],
“subselects”:[],
“actual_row_count”:{ “value”:1081 },
“actual_total_time”:{ “value”:3 },
“start_time”:{ “value”:1761 },
“network_traffic”:{ “value”:35883 },
“network_time”:{ “value”:0 },
“inputs”:[
{
“executor”:“Sort”,
“order”:[
“STR_TO_DATE(remote_0.op_2,?)”
],
“actual_row_count”:{ “value”:1081 },
“actual_total_time”:{ “value”:58 },
“start_time”:{ “value”:1709 },
“memory_usage”:{ “value”:392880 },
“inputs”:[
{
“executor”:“HashGroupBy”,
“out”:[
{
“alias”:"$0",
“projection”:“SUM(remote_0.count)”
}
],
“groups”:[
“remote_0.op”
],
“encoded_group_by_unsupported”:“not a columnstore table: 0tmp”,
“encoded_join_unsupported”:“probe side is not an unordered scan of columnstore”,
“subselects”:[],
“actual_row_count”:{ “value”:1081 },
“actual_total_time”:{ “value”:20 },
“start_time”:{ “value”:335 },
“memory_usage”:{ “value”:524288 },
“inputs”:[
{
“executor”:“Gather”,
“partitions”:“all”,
“query”:“SELECT STRAIGHT_JOIN STR_TO_DATE( DATE_FORMAT(servicedesk
.RegisteredOn
,’%Y-%m-%d %H’),’%Y-%m-%d %H’) AS RegisteredOn
, COUNT() AS count
, STR_TO_DATE( DATE_FORMAT(servicedesk
.RegisteredOn
,’%Y-%m-%d %H’),’%Y-%m-%d %H’) AS op
, DATE_FORMAT(servicedesk
.RegisteredOn
,’%Y-%m-%d %H’) AS op_2
FROM ((((test_0
.servicedesk_2
as servicedesk
LEFT JOIN ( SELECT WITH(NO_MERGE_THIS_SELECT=1) serviceitem__via__ServiceItemI_0
.id
AS id
FROM test
.serviceitem
as serviceitem__via__ServiceItemI_0
) AS serviceitem__via__ServiceItemI
ON (servicedesk
.ServiceItemId
= serviceitem__via__ServiceItemI
.id
)) LEFT JOIN ( SELECT WITH(NO_MERGE_THIS_SELECT=1) casestatus__via__StatusId_0
.id
AS id
FROM test
.casestatus
as casestatus__via__StatusId_0
) AS casestatus__via__StatusId
ON (servicedesk
.StatusId
= casestatus__via__StatusId
.id
)) LEFT JOIN ( SELECT WITH(NO_MERGE_THIS_SELECT=1) sysadminunit_0
.id
AS id
, sysadminunit_0
.name
AS name
FROM test
.sysadminunit
as sysadminunit_0
) AS sysadminunit
ON (sysadminunit
.id
= servicedesk
.GroupId
)) LEFT JOIN ( SELECT WITH(NO_MERGE_THIS_SELECT=1) sysadminunit_prev_0
.id
AS id
, sysadminunit_prev_0
.name
AS name
FROM test
.sysadminunit
as sysadminunit_prev_0
) AS sysadminunit_prev
ON (sysadminunit_prev
.id
= servicedesk
.GroupId_prev
)) WHERE ((servicedesk
.ins_upd_ts
> (‘2019-01-01’!:>datetime(6) NULL)) AND ( IFNULL(sysadminunit
.name
,’’) <> ‘’) AND (servicedesk
.GroupModifiedOn
> (‘2019-01-01’!:>datetime(6) NULL)) AND ISNULL(sysadminunit_prev
.name
) AND (NOT ISNULL(servicedesk
.Number
))) GROUP BY 3 OPTION(NO_QUERY_REWRITE=1, INTERPRETER_MODE=INTERPRET_FIRST)",
“alias”:“remote_0”,
“actual_row_count”:{ “value”:7173 },
“actual_total_time”:{ “value”:0 },
“start_time”:{ “value”:1709 },
“end_time”:{ “value”:1709 },
“inputs”:[
{
“executor”:“Project”,
“out”:[
{
“alias”:“RegisteredOn”,
“projection”:“STR_TO_DATE(DATE_FORMAT(servicedesk.RegisteredOn,’%Y-%m-%d %H’),?)”
},
{
“alias”:"",
“projection”:“count”
},
{
“alias”:“op”,
“projection”:“STR_TO_DATE(DATE_FORMAT(servicedesk.RegisteredOn,’%Y-%m-%d %H’),?)”
},
{
“alias”:“op_2”,
“projection”:“DATE_FORMAT(servicedesk.RegisteredOn,’%Y-%m-%d %H’)”
}
],
“subselects”:[],
“actual_row_count”:{ “value”:7173, “avg”:896.625000, “stddev”:6.632072, “max”:907, “maxPartition”:7 },
“actual_total_time”:{ “value”:22, “avg”:16.500000, “stddev”:5.500000, “max”:22, “maxPartition”:0 },
“start_time”:{ “value”:328, “avg”:964.500000, “stddev”:0.000000, “max”:1692, “maxPartition”:6 },
“network_traffic”:{ “value”:717300, “avg”:89662.500000, “stddev”:663.207170, “max”:90700, “maxPartition”:7 },
“network_time”:{ “value”:0, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“inputs”:[
{
“executor”:“HashGroupBy”,
“out”:[
{
“alias”:“count”,
“projection”:"COUNT()”
}
],
“groups”:[
“STR_TO_DATE(DATE_FORMAT(servicedesk.RegisteredOn,’%Y-%m-%d %H’),?)”
],
“encoded_group_by_unsupported”:“at least one join does not meet requirements for push down to columnstore scan”,
“encoded_join_unsupported”:“probe side is not an unordered scan of columnstore”,
“subselects”:[],
“actual_row_count”:{ “value”:7173, “avg”:896.625000, “stddev”:6.632072, “max”:907, “maxPartition”:7 },
“actual_total_time”:{ “value”:220, “avg”:163.000000, “stddev”:57.000000, “max”:220, “maxPartition”:0 },
“start_time”:{ “value”:152, “avg”:609.375000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“memory_usage”:{ “value”:2097152, “avg”:262144.000000, “stddev”:0.000000, “max”:262144, “maxPartition”:0 },
“inputs”:[
{
“executor”:“Filter”,
“condition”:[
“sysadminunit_prev.name IS NULL”
],
“subselects”:[],
“actual_row_count”:{ “value”:140549, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“inputs”:[
{
“executor”:“HashJoin”,
“condition”:[
“sysadminunit_prev.id = servicedesk.GroupId_prev”
],
“type”:“left”,
“subselects”:[],
“actual_row_count”:{ “value”:140549, “avg”:17568.625000, “stddev”:104.816432, “max”:17694, “maxPartition”:3 },
“actual_total_time”:{ “value”:16, “avg”:11.000000, “stddev”:5.000000, “max”:16, “maxPartition”:0 },
“start_time”:{ “value”:152, “avg”:609.375000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“inputs”:[
{
“executor”:“HashTableBuild”,
“alias”:“sysadminunit_prev”,
“actual_row_count”:{ “value”:20696, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“actual_total_time”:{ “value”:0, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“start_time”:{ “value”:145, “avg”:599.000000, “stddev”:0.000000, “max”:1067, “maxPartition”:6 },
“memory_usage”:{ “value”:4194304, “avg”:524288.000000, “stddev”:0.000000, “max”:524288, “maxPartition”:0 },
“inputs”:[
{
“executor”:“Project”,
“out”:[
{
“alias”:"",
“projection”:“sysadminunit_prev_0.id”
},
{
“alias”:"",
“projection”:“sysadminunit_prev_0.name”
}
],
“est_rows”:“2587”,
“subselects”:[],
“actual_row_count”:{ “value”:20696, “avg”:2587.000000, “stddev”:0.000000, “max”:2587, “maxPartition”:0 },
“actual_total_time”:{ “value”:5, “avg”:3.000000, “stddev”:2.000000, “max”:5, “maxPartition”:0 },
“start_time”:{ “value”:138, “avg”:590.750000, “stddev”:0.000000, “max”:1049, “maxPartition”:6 },
“inputs”:[
{
“executor”:“TableScan”,
“db”:“test”,
“table”:“sysadminunit”,
“alias”:“sysadminunit_prev_0”,
“index”:“PRIMARY KEY (id)”,
“storage”:“lf_skiplist”,
“dir”:“forward”,
“est_table_rows”:“2587”,
“est_filtered”:“2587”,
“actual_row_count”:{ “value”:20696, “avg”:2587.000000, “stddev”:0.000000, “max”:2587, “maxPartition”:0 },
“actual_total_time”:{ “value”:5, “avg”:3.000000, “stddev”:2.000000, “max”:5, “maxPartition”:0 },
“start_time”:{ “value”:138, “avg”:590.750000, “stddev”:0.000000, “max”:1049, “maxPartition”:6 },
“inputs”:[]
}
]
}
]
},
{
“executor”:“Filter”,
“condition”:[
“IFNULL(sysadminunit.name,’’) <> ?”
],
“subselects”:[],
“actual_row_count”:{ “value”:141569, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“inputs”:[
{
“executor”:“HashJoin”,
“condition”:[
“sysadminunit.id = servicedesk.GroupId”
],
“type”:“left”,
“subselects”:[],
“actual_row_count”:{ “value”:141569, “avg”:17696.125000, “stddev”:98.369758, “max”:17822, “maxPartition”:3 },
“actual_total_time”:{ “value”:64, “avg”:44.500000, “stddev”:19.500000, “max”:64, “maxPartition”:0 },
“start_time”:{ “value”:152, “avg”:609.375000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“inputs”:[
{
“executor”:“HashTableBuild”,
“alias”:“sysadminunit”,
“actual_row_count”:{ “value”:20696, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“actual_total_time”:{ “value”:0, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“start_time”:{ “value”:151, “avg”:606.125000, “stddev”:0.000000, “max”:1073, “maxPartition”:6 },
“memory_usage”:{ “value”:4194304, “avg”:524288.000000, “stddev”:0.000000, “max”:524288, “maxPartition”:0 },
“inputs”:[
{
“executor”:“Project”,
“out”:[
{
“alias”:"",
“projection”:“sysadminunit_0.id”
},
{
“alias”:"",
“projection”:“sysadminunit_0.name”
}
],
“est_rows”:“2587”,
“subselects”:[],
“actual_row_count”:{ “value”:20696, “avg”:2587.000000, “stddev”:0.000000, “max”:2587, “maxPartition”:0 },
“actual_total_time”:{ “value”:4, “avg”:2.000000, “stddev”:2.000000, “max”:4, “maxPartition”:1 },
“start_time”:{ “value”:145, “avg”:599.250000, “stddev”:0.000000, “max”:1067, “maxPartition”:6 },
“inputs”:[
{
“executor”:“TableScan”,
“db”:“test”,
“table”:“sysadminunit”,
“alias”:“sysadminunit_0”,
“index”:“PRIMARY KEY (id)”,
“storage”:“lf_skiplist”,
“dir”:“forward”,
“est_table_rows”:“2587”,
“est_filtered”:“2587”,
“actual_row_count”:{ “value”:20696, “avg”:2587.000000, “stddev”:0.000000, “max”:2587, “maxPartition”:0 },
“actual_total_time”:{ “value”:6, “avg”:4.000000, “stddev”:2.000000, “max”:6, “maxPartition”:1 },
“start_time”:{ “value”:145, “avg”:599.250000, “stddev”:0.000000, “max”:1067, “maxPartition”:6 },
“inputs”:[]
}
]
}
]
},
{
“executor”:“HashJoin”,
“condition”:[
“servicedesk.StatusId = casestatus__via__StatusId.id”
],
“type”:“left”,
“subselects”:[],
“actual_row_count”:{ “value”:151133, “avg”:18891.625000, “stddev”:103.758057, “max”:19024, “maxPartition”:3 },
“actual_total_time”:{ “value”:48, “avg”:43.500000, “stddev”:4.500000, “max”:48, “maxPartition”:0 },
“start_time”:{ “value”:152, “avg”:609.375000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“inputs”:[
{
“executor”:“HashTableBuild”,
“alias”:“casestatus__via__StatusId”,
“actual_row_count”:{ “value”:224, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“actual_total_time”:{ “value”:0, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“start_time”:{ “value”:151, “avg”:606.250000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“memory_usage”:{ “value”:1048576, “avg”:131072.000000, “stddev”:0.000000, “max”:131072, “maxPartition”:0 },
“inputs”:[
{
“executor”:“Project”,
“out”:[
{
“alias”:"",
“projection”:“casestatus__via__StatusId_0.id”
}
],
“est_rows”:“28”,
“subselects”:[],
“actual_row_count”:{ “value”:224, “avg”:28.000000, “stddev”:0.000000, “max”:28, “maxPartition”:0 },
“actual_total_time”:{ “value”:0, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“start_time”:{ “value”:151, “avg”:606.125000, “stddev”:0.000000, “max”:1073, “maxPartition”:6 },
“inputs”:[
{
“executor”:“TableScan”,
“db”:“test”,
“table”:“casestatus”,
“alias”:“casestatus__via__StatusId_0”,
“index”:“PRIMARY KEY (id)”,
“storage”:“lf_skiplist”,
“dir”:“forward”,
“est_table_rows”:“28”,
“est_filtered”:“28”,
“actual_row_count”:{ “value”:224, “avg”:28.000000, “stddev”:0.000000, “max”:28, “maxPartition”:0 },
“actual_total_time”:{ “value”:0, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“start_time”:{ “value”:151, “avg”:606.125000, “stddev”:0.000000, “max”:1073, “maxPartition”:6 },
“inputs”:[]
}
]
}
]
},
{
“executor”:“HashJoin”,
“condition”:[
“serviceitem__via__ServiceItemI.id = servicedesk.ServiceItemId”
],
“type”:“left”,
“subselects”:[],
“actual_row_count”:{ “value”:151133, “avg”:18891.625000, “stddev”:103.758057, “max”:19024, “maxPartition”:3 },
“actual_total_time”:{ “value”:101, “avg”:66.000000, “stddev”:35.000000, “max”:101, “maxPartition”:0 },
“start_time”:{ “value”:152, “avg”:609.375000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“inputs”:[
{
“executor”:“HashTableBuild”,
“alias”:“serviceitem__via__ServiceItemI”,
“actual_row_count”:{ “value”:1944, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“actual_total_time”:{ “value”:0, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“start_time”:{ “value”:152, “avg”:609.375000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“memory_usage”:{ “value”:2097152, “avg”:262144.000000, “stddev”:0.000000, “max”:262144, “maxPartition”:0 },
“inputs”:[
{
“executor”:“Project”,
“out”:[
{
“alias”:"",
“projection”:“serviceitem__via__ServiceItemI_0.id”
}
],
“est_rows”:“243”,
“subselects”:[],
“actual_row_count”:{ “value”:1944, “avg”:243.000000, “stddev”:0.000000, “max”:243, “maxPartition”:0 },
“actual_total_time”:{ “value”:2, “avg”:1.000000, “stddev”:1.000000, “max”:2, “maxPartition”:0 },
“start_time”:{ “value”:151, “avg”:608.750000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“inputs”:[
{
“executor”:“TableScan”,
“db”:“test”,
“table”:“serviceitem”,
“alias”:“serviceitem__via__ServiceItemI_0”,
“index”:“PRIMARY KEY (id)”,
“storage”:“lf_skiplist”,
“dir”:“forward”,
“est_table_rows”:“243”,
“est_filtered”:“243”,
“actual_row_count”:{ “value”:1944, “avg”:243.000000, “stddev”:0.000000, “max”:243, “maxPartition”:0 },
“actual_total_time”:{ “value”:4, “avg”:2.000000, “stddev”:2.000000, “max”:4, “maxPartition”:0 },
“start_time”:{ “value”:151, “avg”:608.750000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“inputs”:[]
}
]
}
]
},
{
“executor”:“ChoosePlan”,
“estimate”:[
“SELECT COUNT() AS cost FROM test.servicedesk_2 WHERE servicedesk.GroupModifiedOn > (?!:>datetime(6) NULL)",
"SELECT COUNT() AS cost FROM test.servicedesk_2 WHERE servicedesk.ins_upd_ts > (?!:>datetime(6) NULL)”
],
“inputs”:[
{
“executor”:“Filter”,
“condition”:[
“servicedesk.ins_upd_ts > (?!:>datetime(6) NULL) AND servicedesk.Number IS NOT NULL”
],
“subselects”:[],
“actual_row_count”:{ “value”:132174, “avg”:16521.750000, “stddev”:6245.444555, “max”:19024, “maxPartition”:3 },
“actual_total_time”:{ “value”:0, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“inputs”:[
{
“executor”:“IndexRangeScan”,
“db”:“test”,
“table”:“servicedesk_2”,
“alias”:“servicedesk”,
“index”:“KEY GroupModifiedOn (GroupModifiedOn)”,
“storage”:“lf_skiplist”,
“dir”:“forward”,
“scan”:[
“GroupModifiedOn > (?!:>datetime(6) NULL)”
],
“subselects”:[],
“est_table_rows”:“192867”,
“est_filtered”:“134989”,
“actual_row_count”:{ “value”:138526, “avg”:17315.750000, “stddev”:6545.463787, “max”:19897, “maxPartition”:5 },
“actual_total_time”:{ “value”:80, “avg”:68.000000, “stddev”:12.000000, “max”:80, “maxPartition”:0 },
“start_time”:{ “value”:152, “avg”:545.000000, “stddev”:0.000000, “max”:1074, “maxPartition”:6 },
“inputs”:[]
}
]
},
{
“executor”:“Filter”,
“condition”:[
“servicedesk.GroupModifiedOn > (?!:>datetime(6) NULL) AND servicedesk.Number IS NOT NULL”
],
“subselects”:[],
“actual_row_count”:{ “value”:18959, “avg”:2369.875000, “stddev”:6270.099888, “max”:18959, “maxPartition”:4 },
“actual_total_time”:{ “value”:0, “avg”:0.000000, “stddev”:0.000000, “max”:0, “maxPartition”:0 },
“inputs”:[
{
“executor”:“IndexRangeScan”,
“db”:“test”,
“table”:“servicedesk_2”,
“alias”:“servicedesk”,
“index”:“KEY ins_upd_ts (ins_upd_ts)”,
“storage”:“lf_skiplist”,
“dir”:“forward”,
“scan”:[
“ins_upd_ts > (?!:>datetime(6) NULL)”
],
“subselects”:[],
“est_table_rows”:“192867”,
“est_filtered”:“134989”,
“actual_row_count”:{ “value”:26922, “avg”:3365.250000, “stddev”:8903.614600, “max”:26922, “maxPartition”:4 },
“actual_total_time”:{ “value”:47, “avg”:23.500000, “stddev”:23.500000, “max”:47, “maxPartition”:0 },
“start_time”:{ “value”:1060, “avg”:1060.000000, “stddev”:0.000000, “max”:1060, “maxPartition”:4 },
“inputs”:[]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
],
“version”:“2”,
“warning”:“requires compile”,
“info”:{
“memsql_version”:“6.8.10”,
“memsql_version_hash”:“a53e479edccf4260eb01cdcf14a5c3d46e443da4”,
“num_online_leaves”:“2”,
“num_online_aggs”:“1”,
“context_database”:“test”
}
}