Query time 0.00309
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "709.87"
},
"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": 446,
"rows_produced_per_join": 446,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "44.98",
"eval_cost": "44.60",
"prefix_cost": "89.58",
"data_read_per_join": "6K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "((`dev2`.`PC`.`category_id` in (592,611,660,690,700,701)) 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": 322,
"filtered": "72.23",
"cost_info": {
"read_cost": "111.50",
"eval_cost": "32.21",
"prefix_cost": "245.68",
"data_read_per_join": "2M"
},
"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": 322,
"filtered": "100.00",
"cost_info": {
"read_cost": "80.53",
"eval_cost": "32.21",
"prefix_cost": "358.43",
"data_read_per_join": "1M"
},
"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": 326,
"filtered": "100.00",
"cost_info": {
"read_cost": "81.61",
"eval_cost": "32.64",
"prefix_cost": "472.68",
"data_read_per_join": "7K"
},
"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": 326,
"filtered": "100.00",
"cost_info": {
"read_cost": "204.54",
"eval_cost": "32.64",
"prefix_cost": "709.87",
"data_read_per_join": "1M"
},
"used_columns": [
"id",
"path"
]
}
}
]
}
}
}
}
Result
brand_id |
brand |
image |
category_id |
234 |
BORUS |
https://s3.timeweb.cloud/482029f9-prod/brands__images/234_da67c1403b1a_jme26iyy2weil11sz6qjcuqd1cfoxa54.png |
700 |
584 |
FAW |
https://s3.timeweb.cloud/482029f9-prod/brands__images/584_393dc2db8548_faw.png |
700 |
903 |
ISUZU |
|
700 |
1726 |
SINOTRUK / HOWO |
|
611 |
2312 |
ГАЗ |
https://s3.timeweb.cloud/482029f9-prod/brands__images/2312_1d82b83ccb48_%25D0%2593%25D0%2590%25D0%2597.jpeg |
611 |
2461 |
КАМАЗ |
https://s3.timeweb.cloud/482029f9-prod/brands__images/2461_e3272c707eff_%25D0%25BA%25D0%25B0%25D0%25BC%25D0%25B0%25D0%25B7.jpeg |
611 |
3071 |
КОММАШ |
https://s3.timeweb.cloud/482029f9-prod/brands__images/3071_37917703a704_%25D0%259A%25D0%25BE%25D0%25BC%25D0%25BC%25D0%25B0%25D1%2588.jpeg |
611 |
2558 |
МАЗ |
https://s3.timeweb.cloud/482029f9-prod/brands__images/2558_79f7dfba787b_%25D0%259C%25D0%2590%25D0%2597.png |
700 |
2950 |
УРАЛ |
https://s3.timeweb.cloud/482029f9-prod/brands__images/2950_178e51a7840b_%25D1%2583%25D1%2580%25D0%25B0%25D0%25BB.jpeg |
660 |
2965 |
УСПТК |
|
700 |