Query time 0.00768
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "58.14"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "cscart_ult_objects_sharing",
"access_type": "index",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"share_object_id",
"share_company_id",
"share_object_type"
],
"key_length": "159",
"rows_examined_per_scan": 391,
"rows_produced_per_join": 3,
"filtered": "1.00",
"using_index": true,
"cost_info": {
"read_cost": "39.81",
"eval_cost": "0.39",
"prefix_cost": "40.20",
"data_read_per_join": "625"
},
"used_columns": [
"share_company_id",
"share_object_id",
"share_object_type"
],
"attached_condition": "((`test_uchur_k`.`cscart_ult_objects_sharing`.`share_company_id` = 1) and (`test_uchur_k`.`cscart_ult_objects_sharing`.`share_object_type` = 'product_features'))"
}
},
{
"table": {
"table_name": "f",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"test_uchur_k.cscart_ult_objects_sharing.share_object_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "9.31",
"index_condition": "(`test_uchur_k`.`cscart_ult_objects_sharing`.`share_object_id` = `test_uchur_k`.`f`.`feature_id`)",
"cost_info": {
"read_cost": "0.98",
"eval_cost": "0.04",
"prefix_cost": "41.57",
"data_read_per_join": "719"
},
"used_columns": [
"feature_id",
"feature_type",
"categories_path",
"parent_id",
"display_on_catalog",
"status",
"position"
],
"attached_condition": "((`test_uchur_k`.`f`.`status` = 'A') and (`test_uchur_k`.`f`.`display_on_catalog` = 'Y') and ((`test_uchur_k`.`f`.`categories_path` = '') or (0 <> find_in_set(54,`test_uchur_k`.`f`.`categories_path`)) or (0 <> find_in_set(75,`test_uchur_k`.`f`.`categories_path`)) or (0 <> find_in_set(76,`test_uchur_k`.`f`.`categories_path`))) and (if(`test_uchur_k`.`f`.`parent_id`,(/* select#2 */ select `test_uchur_k`.`df`.`status` from `test_uchur_k`.`cscart_product_features` `df` where (`test_uchur_k`.`df`.`feature_id` = `test_uchur_k`.`f`.`parent_id`)),'A') = 'A'))",
"attached_subqueries": [
{
"dependent": true,
"cacheable": false,
"query_block": {
"select_id": 2,
"cost_info": {
"query_cost": "0.35"
},
"table": {
"table_name": "df",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"test_uchur_k.f.parent_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "0.35",
"data_read_per_join": "1K"
},
"used_columns": [
"feature_id",
"status"
]
}
}
}
]
}
},
{
"table": {
"table_name": "v",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "fl",
"used_key_parts": [
"feature_id",
"lang_code"
],
"key_length": "9",
"ref": [
"test_uchur_k.cscart_ult_objects_sharing.share_object_id",
"const"
],
"rows_examined_per_scan": 122,
"rows_produced_per_join": 0,
"filtered": "2.13",
"index_condition": "((`test_uchur_k`.`v`.`feature_id` = `test_uchur_k`.`f`.`feature_id`) and ((`test_uchur_k`.`v`.`variant_id` <> 0) or ((`test_uchur_k`.`f`.`feature_type` <> 'C') and (`test_uchur_k`.`v`.`value` <> '')) or (`test_uchur_k`.`f`.`feature_type` = 'C') or (`test_uchur_k`.`v`.`value_int` <> 0)))",
"cost_info": {
"read_cost": "11.10",
"eval_cost": "0.09",
"prefix_cost": "57.11",
"data_read_per_join": "747"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"value",
"value_int",
"lang_code"
],
"attached_condition": "(`test_uchur_k`.`v`.`product_id` in (51007,51004,51005,51010,51012,51013,51011,51015,51006,51021,51016,51024,51017,51019,51018,51022,51014,51045,51025,51029,51027,51020,51028,51031,51042,51030,51032))"
}
},
{
"table": {
"table_name": "fd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id",
"lang_code"
],
"key_length": "9",
"ref": [
"test_uchur_k.f.feature_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.09",
"eval_cost": "0.09",
"prefix_cost": "57.30",
"data_read_per_join": "2K"
},
"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": [
"test_uchur_k.v.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.24",
"eval_cost": "0.09",
"prefix_cost": "57.63",
"data_read_per_join": "1K"
},
"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": [
"test_uchur_k.fv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.24",
"eval_cost": "0.09",
"prefix_cost": "57.96",
"data_read_per_join": "2K"
},
"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": [
"test_uchur_k.f.parent_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.09",
"eval_cost": "0.09",
"prefix_cost": "58.15",
"data_read_per_join": "1K"
},
"used_columns": [
"feature_id",
"feature_type",
"position"
],
"attached_condition": "<if>(is_not_null_compl(gf), (`test_uchur_k`.`gf`.`feature_type` = 'G'), true)"
}
}
]
}
}
}
Result
| product_id |
feature_id |
value |
value_int |
variant_id |
feature_type |
description |
prefix |
suffix |
variant |
parent_id |
position |
gposition |
| 51042 |
1 |
|
|
548 |
E |
Бренд |
|
|
ARMYTEK |
0 |
0 |
|
| 51045 |
1 |
|
|
548 |
E |
Бренд |
|
|
ARMYTEK |
0 |
0 |
|
| 51028 |
1 |
|
|
594 |
E |
Бренд |
|
|
Fenix |
0 |
0 |
|
| 51029 |
1 |
|
|
594 |
E |
Бренд |
|
|
Fenix |
0 |
0 |
|
| 51031 |
1 |
|
|
594 |
E |
Бренд |
|
|
Fenix |
0 |
0 |
|
| 51030 |
1 |
|
|
594 |
E |
Бренд |
|
|
Fenix |
0 |
0 |
|
| 51032 |
1 |
|
|
594 |
E |
Бренд |
|
|
Fenix |
0 |
0 |
|
| 51019 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51018 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51004 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51021 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51022 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51024 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51012 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51015 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51011 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51027 |
1 |
|
|
548 |
E |
Бренд |
|
|
ARMYTEK |
0 |
0 |
|
| 51025 |
1 |
|
|
548 |
E |
Бренд |
|
|
ARMYTEK |
0 |
0 |
|
| 51020 |
1 |
|
|
548 |
E |
Бренд |
|
|
ARMYTEK |
0 |
0 |
|
| 51007 |
1 |
|
|
548 |
E |
Бренд |
|
|
ARMYTEK |
0 |
0 |
|
| 51016 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51010 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51017 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51014 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51005 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51013 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51006 |
1 |
|
|
593 |
E |
Бренд |
|
|
PETZL |
0 |
0 |
|
| 51024 |
55 |
|
|
1429 |
S |
Модель |
|
|
TIKKINA HEADLAMP |
0 |
20 |
|
| 51015 |
55 |
|
0.00 |
1426 |
S |
Модель |
|
|
TIKKA HEADLAMP |
0 |
20 |
|
| 51018 |
55 |
|
|
1426 |
S |
Модель |
|
|
TIKKA HEADLAMP |
0 |
20 |
|
| 51016 |
55 |
|
|
1426 |
S |
Модель |
|
|
TIKKA HEADLAMP |
0 |
20 |
|
| 51017 |
55 |
|
|
1426 |
S |
Модель |
|
|
TIKKA HEADLAMP |
0 |
20 |
|
| 51013 |
55 |
|
|
1418 |
S |
Модель |
|
|
TIKKA CORE HEADLAMP |
0 |
20 |
|
| 51014 |
55 |
|
|
1418 |
S |
Модель |
|
|
TIKKA CORE HEADLAMP |
0 |
20 |
|
| 51012 |
55 |
|
|
1414 |
S |
Модель |
|
|
TIKKA CORE |
0 |
20 |
|
| 51011 |
55 |
|
|
1414 |
S |
Модель |
|
|
TIKKA CORE |
0 |
20 |
|
| 51010 |
55 |
|
0.00 |
1409 |
S |
Модель |
|
|
ACTIK CORE |
0 |
20 |
|
| 51004 |
55 |
|
|
1399 |
S |
Модель |
|
|
ACTIK |
0 |
20 |
|
| 51005 |
55 |
|
|
1399 |
S |
Модель |
|
|
ACTIK |
0 |
20 |
|
| 51006 |
55 |
|
|
1399 |
S |
Модель |
|
|
ACTIK |
0 |
20 |
|
| 51022 |
55 |
|
|
1429 |
S |
Модель |
|
|
TIKKINA HEADLAMP |
0 |
20 |
|
| 51021 |
55 |
|
|
1429 |
S |
Модель |
|
|
TIKKINA HEADLAMP |
0 |
20 |
|
| 51019 |
55 |
|
0.00 |
1429 |
S |
Модель |
|
|
TIKKINA HEADLAMP |
0 |
20 |
|
| 51007 |
55 |
|
|
1435 |
S |
Модель |
|
|
Wizard C2 Pro Max LR |
0 |
20 |
|
| 51020 |
55 |
|
|
1479 |
S |
Модель |
|
|
Wizard C1 Pro |
0 |
20 |
|
| 51025 |
55 |
|
|
1485 |
S |
Модель |
|
|
Wizard C2 Pro |
0 |
20 |
|
| 51027 |
55 |
|
|
1491 |
S |
Модель |
|
|
Wizard C2 Pro Max |
0 |
20 |
|
| 51028 |
55 |
|
|
1493 |
S |
Модель |
|
|
HL16bk |
0 |
20 |
|
| 51030 |
55 |
|
|
1497 |
S |
Модель |
|
|
HL17R |
0 |
20 |
|
| 51029 |
55 |
|
|
1497 |
S |
Модель |
|
|
HL17R |
0 |
20 |
|
| 51031 |
55 |
|
|
1501 |
S |
Модель |
|
|
HL32RT |
0 |
20 |
|
| 51042 |
55 |
|
|
1533 |
S |
Модель |
|
|
Elf C1 |
0 |
20 |
|
| 51045 |
55 |
|
|
1536 |
S |
Модель |
|
|
Elf C2 |
0 |
20 |
|
| 51029 |
39 |
|
|
280 |
S |
Цвет |
|
|
Белый |
0 |
510 |
|
| 51045 |
39 |
|
|
165 |
S |
Цвет |
|
|
Черный |
0 |
510 |
|
| 51042 |
39 |
|
|
165 |
S |
Цвет |
|
|
Черный |
0 |
510 |
|
| 51030 |
39 |
|
|
165 |
S |
Цвет |
|
|
Черный |
0 |
510 |
|
| 51027 |
39 |
|
|
165 |
S |
Цвет |
|
|
Черный |
0 |
510 |
|
| 51025 |
39 |
|
|
165 |
S |
Цвет |
|
|
Черный |
0 |
510 |
|
| 51020 |
39 |
|
|
165 |
S |
Цвет |
|
|
Черный |
0 |
510 |
|
| 51007 |
39 |
|
|
165 |
S |
Цвет |
|
|
Черный |
0 |
510 |
|
| 51015 |
39 |
|
|
170 |
S |
Цвет |
|
|
Серый |
0 |
510 |
|
| 51010 |
39 |
|
|
170 |
S |
Цвет |
|
|
Серый |
0 |
510 |
|
| 51011 |
39 |
|
|
170 |
S |
Цвет |
|
|
Серый |
0 |
510 |
|
| 51019 |
39 |
|
|
170 |
S |
Цвет |
|
|
Серый |
0 |
510 |
|
| 51031 |
39 |
|
|
201 |
S |
Цвет |
|
|
Красный/Черный |
0 |
510 |
|
| 51028 |
39 |
|
|
201 |
S |
Цвет |
|
|
Красный/Черный |
0 |
510 |
|
| 51014 |
39 |
|
0.00 |
1425 |
S |
Цвет |
|
|
Желтый |
0 |
510 |
|
| 51013 |
39 |
|
|
469 |
S |
Цвет |
|
|
Зеленый |
0 |
510 |
|
| 51005 |
39 |
|
|
469 |
S |
Цвет |
|
|
Зеленый |
0 |
510 |
|
| 51022 |
39 |
|
|
469 |
S |
Цвет |
|
|
Зеленый |
0 |
510 |
|
| 51017 |
39 |
|
|
469 |
S |
Цвет |
|
|
Зеленый |
0 |
510 |
|
| 51012 |
39 |
|
|
1396 |
S |
Цвет |
|
|
Синий |
0 |
510 |
|
| 51016 |
39 |
|
|
1396 |
S |
Цвет |
|
|
Синий |
0 |
510 |
|
| 51032 |
39 |
|
|
1396 |
S |
Цвет |
|
|
Синий |
0 |
510 |
|
| 51021 |
39 |
|
|
1396 |
S |
Цвет |
|
|
Синий |
0 |
510 |
|
| 51004 |
39 |
|
|
1396 |
S |
Цвет |
|
|
Синий |
0 |
510 |
|
| 51006 |
39 |
|
|
1408 |
S |
Цвет |
|
|
Красный |
0 |
510 |
|
| 51024 |
39 |
|
|
1408 |
S |
Цвет |
|
|
Красный |
0 |
510 |
|
| 51018 |
39 |
|
|
1425 |
S |
Цвет |
|
|
Желтый |
0 |
510 |
|