Query time 0.00144
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "41.30"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_orders",
"access_type": "index_merge",
"possible_keys": [
"PRIMARY",
"user_id",
"status"
],
"key": "intersect(status,user_id)",
"key_length": "3,3",
"rows_examined_per_scan": 61,
"rows_produced_per_join": 61,
"filtered": "99.90",
"cost_info": {
"read_cost": "13.85",
"eval_cost": "6.10",
"prefix_cost": "19.95",
"data_read_per_join": "631K"
},
"used_columns": [
"order_id",
"user_id",
"status"
],
"attached_condition": "(((`chocoramo`.`cscart_orders`.`user_id` = 0) and (`chocoramo`.`cscart_orders`.`status` = 'C')) and (`chocoramo`.`cscart_orders`.`order_id` is not null))"
}
},
{
"table": {
"table_name": "cscart_order_details",
"access_type": "ref",
"possible_keys": [
"o_k"
],
"key": "o_k",
"used_key_parts": [
"order_id"
],
"key_length": "3",
"ref": [
"chocoramo.cscart_orders.order_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 30,
"filtered": "50.00",
"index_condition": "(`chocoramo`.`cscart_order_details`.`product_id` in (67211,67212,67213,67214,67215,67216,67217,67218))",
"cost_info": {
"read_cost": "15.25",
"eval_cost": "3.05",
"prefix_cost": "41.30",
"data_read_per_join": "7K"
},
"used_columns": [
"item_id",
"order_id",
"product_id"
]
}
}
]
}
}
Result
COUNT(cscart_order_details.item_id) |
0 |