Query time 0.00107
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "141.91"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "PC",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"link_type",
"pt",
"idx_pc_product_id_type"
],
"key": "link_type",
"used_key_parts": [
"link_type",
"category_id"
],
"key_length": "6",
"ref": [
"const",
"const"
],
"rows_examined_per_scan": 95,
"rows_produced_per_join": 95,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.28",
"eval_cost": "9.50",
"prefix_cost": "9.78",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"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": 68,
"filtered": "72.23",
"cost_info": {
"read_cost": "23.75",
"eval_cost": "6.86",
"prefix_cost": "43.03",
"data_read_per_join": "517K"
},
"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": 68,
"filtered": "100.00",
"cost_info": {
"read_cost": "17.15",
"eval_cost": "6.86",
"prefix_cost": "67.04",
"data_read_per_join": "235K"
},
"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": 69,
"filtered": "100.00",
"cost_info": {
"read_cost": "17.38",
"eval_cost": "6.95",
"prefix_cost": "91.38",
"data_read_per_join": "1K"
},
"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": 69,
"filtered": "100.00",
"cost_info": {
"read_cost": "43.58",
"eval_cost": "6.95",
"prefix_cost": "141.91",
"data_read_per_join": "259K"
},
"used_columns": [
"id",
"path"
]
}
}
]
}
}
}
}
Result
brand_id |
brand |
image |
category_id |
3110 |
Audi |
|
740 |
3107 |
BMW |
|
740 |
318 |
CHERY |
|
740 |
3089 |
EXEED |
|
740 |
594 |
FERRARI |
|
740 |
3114 |
GAC |
|
740 |
3087 |
Geely |
|
740 |
3086 |
HAVAL |
|
740 |
869 |
HYUNDAI |
https://s3.timeweb.cloud/482029f9-prod/brands__images/869_9b9873422459_Hyundai.png |
740 |
911 |
JAC |
https://s3.timeweb.cloud/482029f9-prod/brands__images/911_c7ef8bb105f7_jac.png |
740 |
3096 |
Lada (ВАЗ) |
|
740 |
3099 |
Lexus |
|
740 |
3113 |
Li |
|
740 |
1247 |
MERCEDES |
|
740 |
3093 |
OMODA |
|
740 |
3094 |
Tank |
|
740 |
1942 |
TOYOTA |
|
740 |
2312 |
ГАЗ |
https://s3.timeweb.cloud/482029f9-prod/brands__images/2312_1d82b83ccb48_%25D0%2593%25D0%2590%25D0%2597.jpeg |
740 |