Query time 0.00219
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "314.26"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "128.13"
},
"nested_loop": [
{
"table": {
"table_name": "a",
"access_type": "ALL",
"possible_keys": [
"shipping_id"
],
"rows_examined_per_scan": 176,
"rows_produced_per_join": 49,
"filtered": "28.00",
"cost_info": {
"read_cost": "28.34",
"eval_cost": "9.86",
"prefix_cost": "38.20",
"data_read_per_join": "113K"
},
"used_columns": [
"shipping_id",
"company_id",
"min_weight",
"max_weight",
"usergroup_ids",
"tax_ids",
"position",
"status"
],
"attached_condition": "((`webmarco`.`a`.`company_id` = 379) or (`webmarco`.`a`.`shipping_id` in (48,49)))"
}
},
{
"table": {
"table_name": "b",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"shipping_id",
"lang_code"
],
"key_length": "9",
"ref": [
"webmarco.a.shipping_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 49,
"filtered": "100.00",
"cost_info": {
"read_cost": "49.28",
"eval_cost": "9.86",
"prefix_cost": "97.34",
"data_read_per_join": "47K"
},
"used_columns": [
"shipping_id",
"lang_code",
"shipping",
"delivery_time"
]
}
},
{
"table": {
"table_name": "c",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"webmarco.a.company_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 49,
"filtered": "100.00",
"cost_info": {
"read_cost": "49.28",
"eval_cost": "9.86",
"prefix_cost": "156.47",
"data_read_per_join": "469K"
},
"used_columns": [
"company_id",
"company"
]
}
},
{
"table": {
"table_name": "storefronts_shippings",
"access_type": "index",
"key": "idx_storefront_id",
"used_key_parts": [
"storefront_id"
],
"key_length": "4",
"rows_examined_per_scan": 13,
"rows_produced_per_join": 128,
"filtered": "20.00",
"using_index": true,
"using_join_buffer": "Block Nested Loop",
"cost_info": {
"read_cost": "4.04",
"eval_cost": "25.63",
"prefix_cost": "186.13",
"data_read_per_join": "2K"
},
"used_columns": [
"storefront_id",
"shipping_id"
],
"attached_condition": "(<if>(found_match(storefronts_shippings), ((`webmarco`.`storefronts_shippings`.`storefront_id` = 1) or isnull(`webmarco`.`storefronts_shippings`.`storefront_id`)), true) and <if>(is_not_null_compl(storefronts_shippings), (`webmarco`.`storefronts_shippings`.`shipping_id` = `webmarco`.`a`.`shipping_id`), true))"
}
}
]
}
}
}
Result
shipping_id |
company_id |
min_weight |
max_weight |
position |
status |
tax_ids |
usergroup_ids |
shipping |
delivery_time |
company_name |
storefront_id |
163 |
379 |
0.000 |
0.000 |
0 |
A |
|
0 |
Riser Trade |
|
Riser Trade Co Ltd |
|
123 |
379 |
0.000 |
0.000 |
0 |
A |
|
0 |
Shipping - Riser Trade Co Ltd |
|
Riser Trade Co Ltd |
|
48 |
0 |
0.000 |
0.000 |
25 |
A |
|
0 |
SDA Express courier |
|
|
|
49 |
0 |
0.000 |
0.000 |
26 |
A |
|
0 |
DHL Express |
1-6 business days |
|
|