Query time 0.00082
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "0.39"
},
"nested_loop": [
{
"table": {
"table_name": "r",
"access_type": "system",
"possible_keys": [
"order_id",
"status"
],
"rows_examined_per_scan": 0,
"rows_produced_per_join": 1,
"filtered": "0.00",
"const_row_not_found": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "48"
},
"used_columns": [
"return_id",
"order_id",
"status"
]
}
},
{
"table": {
"table_name": "rp",
"access_type": "system",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 0,
"rows_produced_per_join": 1,
"filtered": "0.00",
"const_row_not_found": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "808"
},
"used_columns": [
"return_id",
"product_id",
"amount",
"price"
]
}
},
{
"table": {
"table_name": "o",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"timestamp",
"user_id",
"status"
],
"key": "user_id",
"used_key_parts": [
"user_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "6.41",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.01",
"prefix_cost": "0.35",
"data_read_per_join": "668"
},
"used_columns": [
"order_id",
"user_id",
"timestamp",
"status"
],
"attached_condition": "((`demouniformecomd_db`.`o`.`timestamp` > 1735689600) and (`demouniformecomd_db`.`o`.`timestamp` < 1767225599) and (`demouniformecomd_db`.`o`.`status` not in ('D','I','B','F','A')))"
}
},
{
"table": {
"table_name": "od",
"access_type": "ref",
"possible_keys": [
"o_k"
],
"key": "o_k",
"used_key_parts": [
"order_id"
],
"key_length": "3",
"ref": [
"demouniformecomd_db.o.order_id"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.01",
"prefix_cost": "0.39",
"data_read_per_join": "29"
},
"used_columns": [
"order_id",
"product_id",
"price",
"amount"
]
}
}
]
}
}
Result
total_orders |
total_spent |
0 |
0.00 |