Query time 0.00809
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "3635.82"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "PC",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"link_type",
"pt",
"idx_pc_product_id_type"
],
"key": "link_type",
"used_key_parts": [
"link_type",
"category_id"
],
"key_length": "6",
"rows_examined_per_scan": 2285,
"rows_produced_per_join": 2285,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "229.39",
"eval_cost": "228.50",
"prefix_cost": "457.89",
"data_read_per_join": "35K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "((`dev2`.`PC`.`category_id` in (566,567,593,752,811,812,813,910,911,912,913,914,915,916)) and (`dev2`.`PC`.`link_type` = 'M'))"
}
},
{
"table": {
"table_name": "P",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status",
"cscart_products_brand_id_index",
"cscart_products_product_id_index",
"idx_status"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"dev2.PC.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1650,
"filtered": "72.23",
"cost_info": {
"read_cost": "571.25",
"eval_cost": "165.04",
"prefix_cost": "1257.64",
"data_read_per_join": "12M"
},
"used_columns": [
"product_id",
"status",
"brand_id"
],
"attached_condition": "((`dev2`.`P`.`status` = 'A') and (`dev2`.`P`.`brand_id` is not null))"
}
},
{
"table": {
"table_name": "B",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"cscart_brands_pk2"
],
"key": "PRIMARY",
"used_key_parts": [
"brand_id"
],
"key_length": "4",
"ref": [
"dev2.P.brand_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1650,
"filtered": "100.00",
"cost_info": {
"read_cost": "412.59",
"eval_cost": "165.04",
"prefix_cost": "1835.26",
"data_read_per_join": "5M"
},
"used_columns": [
"brand_id",
"brand"
]
}
},
{
"table": {
"table_name": "FI",
"access_type": "ref",
"possible_keys": [
"idx_fi_object_id_type"
],
"key": "idx_fi_object_id_type",
"used_key_parts": [
"object_id",
"object_type"
],
"key_length": "5",
"ref": [
"dev2.P.brand_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1672,
"filtered": "100.00",
"cost_info": {
"read_cost": "418.12",
"eval_cost": "167.25",
"prefix_cost": "2420.64",
"data_read_per_join": "39K"
},
"used_columns": [
"object_id",
"object_type",
"file_id"
]
}
},
{
"table": {
"table_name": "F",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"id"
],
"key_length": "4",
"ref": [
"dev2.FI.file_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1672,
"filtered": "100.00",
"cost_info": {
"read_cost": "1047.93",
"eval_cost": "167.25",
"prefix_cost": "3635.82",
"data_read_per_join": "6M"
},
"used_columns": [
"id",
"path"
]
}
}
]
}
}
}
}
Result
brand_id |
brand |
image |
category_id |
3073 |
CEYLIFT |
|
567 |
320 |
CHL |
|
567 |
432 |
DINGLI |
|
811 |
455 |
DOOSAN |
https://s3.timeweb.cloud/482029f9-prod/brands__images/455_79188a46da42_DOOSAN.jpeg |
567 |
527 |
EP |
|
567 |
560 |
EVERUN |
|
567 |
668 |
GENIE |
|
813 |
693 |
GOODSENSE |
|
567 |
741 |
HANGCHA |
https://s3.timeweb.cloud/482029f9-prod/brands__images/741_f18dfb94a21d_Hangcha.png |
567 |
759 |
HAULOTTE |
|
811 |
777 |
HELI |
https://s3.timeweb.cloud/482029f9-prod/brands__images/777_19a27ce4f4e0_Heli.png |
567 |
869 |
HYUNDAI |
https://s3.timeweb.cloud/482029f9-prod/brands__images/869_9b9873422459_Hyundai.png |
567 |
911 |
JAC |
https://s3.timeweb.cloud/482029f9-prod/brands__images/911_c7ef8bb105f7_jac.png |
567 |
1088 |
LGMG |
|
811 |
1116 |
LIUGONG |
https://s3.timeweb.cloud/482029f9-prod/brands__images/1116_0da27f79a446_liugong.jpeg |
567 |
1132 |
LONKING |
https://s3.timeweb.cloud/482029f9-prod/brands__images/1132_1e1123be6567_lonking.png |
567 |
3082 |
MITSUBI |
|
567 |
1280 |
MITSUBISHI |
https://s3.timeweb.cloud/482029f9-prod/brands__images/1280_14ff5fa14c50_Mitsubishi.png |
567 |
1360 |
NOBLELIFT |
https://s3.timeweb.cloud/482029f9-prod/brands__images/1360_846a1b54e85e_Noblelift.jpeg |
567 |
1405 |
OXLIFT |
|
910 |