Query time 0.00054
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "3.40"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "2.00"
},
"nested_loop": [
{
"table": {
"table_name": "wpa",
"access_type": "ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.50",
"eval_cost": "0.20",
"prefix_cost": "0.70",
"data_read_per_join": "32"
},
"used_columns": [
"warehouse_id",
"product_id",
"amount"
]
}
},
{
"table": {
"table_name": "sl",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"store_location_id"
],
"key_length": "3",
"ref": [
"dev_yourmart_co_bw.wpa.warehouse_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.50",
"eval_cost": "0.20",
"prefix_cost": "1.40",
"data_read_per_join": "1K"
},
"used_columns": [
"store_location_id",
"position",
"status",
"main_destination_id",
"pickup_destinations_ids",
"store_type",
"shipping_destinations_ids"
]
}
}
]
}
}
}
Result
warehouse_id |
amount |
store_type |
position |
main_destination_id |
pickup_destinations_ids |
shipping_destinations_ids |
status |
4 |
2 |
W |
2 |
11 |
0 |
20,15,11 |
A |
5 |
2 |
W |
2 |
12 |
0 |
13,16,18,17,14,12,19,1 |
A |