Query time 0.00121
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "69.07"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "v",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 21,
"rows_produced_per_join": 20,
"filtered": "99.99",
"index_condition": "(`44mm_ru`.`v`.`product_id` in (335,324))",
"cost_info": {
"read_cost": "27.21",
"eval_cost": "4.20",
"prefix_cost": "31.41",
"data_read_per_join": "16K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"value",
"value_int",
"lang_code"
],
"attached_condition": "((`44mm_ru`.`v`.`lang_code` = 'ru') and (`44mm_ru`.`v`.`feature_id` is not null))"
}
},
{
"table": {
"table_name": "f",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"44mm_ru.v.feature_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "9.89",
"cost_info": {
"read_cost": "21.00",
"eval_cost": "0.42",
"prefix_cost": "56.61",
"data_read_per_join": "2K"
},
"used_columns": [
"feature_id",
"feature_type",
"categories_path",
"parent_id",
"display_on_catalog",
"status",
"position"
],
"attached_condition": "((`44mm_ru`.`f`.`status` = 'A') and (`44mm_ru`.`f`.`display_on_catalog` = 'Y') and ((`44mm_ru`.`f`.`categories_path` = '') or find_in_set(166,`44mm_ru`.`f`.`categories_path`) or find_in_set(196,`44mm_ru`.`f`.`categories_path`) or find_in_set(237,`44mm_ru`.`f`.`categories_path`)) and (if(`44mm_ru`.`f`.`parent_id`,(/* select#2 */ select `44mm_ru`.`df`.`status` from `44mm_ru`.`cscart_product_features` `df` where (`44mm_ru`.`df`.`feature_id` = `44mm_ru`.`f`.`parent_id`)),'A') = 'A') and ((`44mm_ru`.`v`.`variant_id` <> 0) or ((`44mm_ru`.`f`.`feature_type` <> 'C') and (`44mm_ru`.`v`.`value` <> '')) or (`44mm_ru`.`f`.`feature_type` = 'C') or (`44mm_ru`.`v`.`value_int` <> '')))",
"attached_subqueries": [
{
"dependent": true,
"cacheable": false,
"query_block": {
"select_id": 2,
"cost_info": {
"query_cost": "1.20"
},
"table": {
"table_name": "df",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"44mm_ru.f.parent_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.20",
"prefix_cost": "1.20",
"data_read_per_join": "1K"
},
"used_columns": [
"feature_id",
"status"
]
}
}
}
]
}
},
{
"table": {
"table_name": "fd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id",
"lang_code"
],
"key_length": "9",
"ref": [
"44mm_ru.v.feature_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.08",
"eval_cost": "0.42",
"prefix_cost": "59.10",
"data_read_per_join": "4K"
},
"used_columns": [
"feature_id",
"description",
"prefix",
"suffix",
"lang_code"
]
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"44mm_ru.v.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.08",
"eval_cost": "0.42",
"prefix_cost": "61.59",
"data_read_per_join": "2K"
},
"used_columns": [
"variant_id",
"position"
]
}
},
{
"table": {
"table_name": "vd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"44mm_ru.fv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.08",
"eval_cost": "0.42",
"prefix_cost": "64.09",
"data_read_per_join": "12K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
},
{
"table": {
"table_name": "gf",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"44mm_ru.f.parent_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.08",
"eval_cost": "0.42",
"prefix_cost": "66.58",
"data_read_per_join": "2K"
},
"used_columns": [
"feature_id",
"feature_type",
"position"
],
"attached_condition": "<if>(is_not_null_compl(gf), (`44mm_ru`.`gf`.`feature_type` = 'G'), true)"
}
},
{
"table": {
"table_name": "cscart_ult_objects_sharing",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"share_object_id",
"share_company_id",
"share_object_type"
],
"key_length": "159",
"ref": [
"44mm_ru.v.feature_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2.08",
"eval_cost": "0.42",
"prefix_cost": "69.07",
"data_read_per_join": "332"
},
"used_columns": [
"share_company_id",
"share_object_id",
"share_object_type"
],
"attached_condition": "(`44mm_ru`.`cscart_ult_objects_sharing`.`share_object_id` = `44mm_ru`.`v`.`feature_id`)"
}
}
]
}
}
}
Result
product_id |
feature_id |
value |
value_int |
variant_id |
feature_type |
description |
prefix |
suffix |
variant |
parent_id |
position |
gposition |
324 |
18 |
|
|
89 |
E |
Бренд |
|
|
IEK |
0 |
0 |
|
335 |
18 |
|
|
89 |
E |
Бренд |
|
|
IEK |
0 |
0 |
|
324 |
563 |
|
87.00 |
7092 |
N |
Высота |
|
мм |
87 |
0 |
0 |
|
335 |
563 |
|
87.00 |
7092 |
N |
Высота |
|
мм |
87 |
0 |
0 |
|
335 |
565 |
|
50.00 |
7093 |
N |
Глубина |
|
мм |
50 |
0 |
0 |
|
324 |
565 |
|
50.00 |
7093 |
N |
Глубина |
|
мм |
50 |
0 |
0 |
|
324 |
578 |
|
|
7090 |
S |
Исполнение |
|
|
В корпусе на DIN-рейку |
48 |
0 |
0 |
335 |
578 |
|
|
7090 |
S |
Исполнение |
|
|
В корпусе на DIN-рейку |
48 |
0 |
0 |
324 |
569 |
|
|
7089 |
S |
Количество кабельных выводов |
|
|
28 |
48 |
0 |
0 |
335 |
569 |
|
|
7116 |
S |
Количество кабельных выводов |
|
|
44 |
48 |
0 |
0 |
335 |
581 |
|
|
7094 |
S |
Количество шин |
|
|
4 |
48 |
0 |
0 |
324 |
581 |
|
|
7094 |
S |
Количество шин |
|
|
4 |
48 |
0 |
0 |
324 |
577 |
|
|
7088 |
S |
Материал |
|
|
Пластик |
48 |
0 |
0 |
335 |
577 |
|
|
7088 |
S |
Материал |
|
|
Пластик |
48 |
0 |
0 |
324 |
576 |
|
|
7067 |
S |
Номинальный ток |
|
|
100 |
48 |
0 |
0 |
335 |
576 |
|
|
7055 |
S |
Номинальный ток |
|
|
125 |
48 |
0 |
0 |
335 |
571 |
|
|
7075 |
S |
Рабочая температура |
|
|
от -45°C до +80°C |
48 |
60 |
0 |
324 |
571 |
|
|
7075 |
S |
Рабочая температура |
|
|
от -45°C до +80°C |
48 |
60 |
0 |
335 |
38 |
100х87х50 |
|
0 |
T |
Размеры (ШxВxГ) |
|
|
|
37 |
0 |
100 |
324 |
38 |
65х87х50 |
|
0 |
T |
Размеры (ШxВxГ) |
|
|
|
37 |
0 |
100 |
324 |
549 |
|
|
1201 |
S |
Страна |
|
|
Китай |
0 |
10 |
|
335 |
549 |
|
|
1201 |
S |
Страна |
|
|
Китай |
0 |
10 |
|
324 |
566 |
|
65.00 |
7091 |
N |
Ширина |
|
мм |
65 |
0 |
0 |
|
335 |
566 |
|
100.00 |
7117 |
N |
Ширина |
|
мм |
100 |
0 |
0 |
|