Query time 0.00288
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "277.61"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "f",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.20",
"prefix_cost": "0.00",
"data_read_per_join": "432"
},
"used_columns": [
"feature_id",
"feature_type",
"categories_path",
"parent_id",
"display_on_catalog",
"status",
"position"
]
}
},
{
"table": {
"table_name": "v",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl"
],
"key": "fpl",
"used_key_parts": [
"feature_id",
"product_id",
"lang_code"
],
"key_length": "12",
"rows_examined_per_scan": 53,
"rows_produced_per_join": 53,
"filtered": "100.00",
"index_condition": "((`portal`.`v`.`feature_id` = 2) and (`portal`.`v`.`product_id` in (47679,47680,47681,47682,47683,47684,47685,47688,47691,47694,47695,47696,47702,47705,47706,47707,47708,47709,47710,47711,47712,47714,47719,47720,47721,47722,47725,47730,47731,47732,47733,47734,47735,47736,47737,47738,47739,47740,47741,47742,47743,47744,47745,47746,47747,47748,47749,47750,47751,47752,47766,47773,47774)) and (`portal`.`v`.`lang_code` = 'en'))",
"cost_info": {
"read_cost": "116.61",
"eval_cost": "10.60",
"prefix_cost": "127.21",
"data_read_per_join": "40K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"value",
"value_int",
"lang_code"
],
"attached_condition": "((if('1',(/* select#2 */ select 'A' from `portal`.`q_product_features` `df` where 1),'A') = 'A') and ((`portal`.`v`.`variant_id` <> 0) or (<cache>(('E' <> 'C')) and (`portal`.`v`.`value` <> '')) or <cache>(('E' = 'C')) or (`portal`.`v`.`value_int` <> '')))",
"attached_subqueries": [
{
"dependent": true,
"cacheable": false,
"query_block": {
"select_id": 2,
"cost_info": {
"query_cost": "1.00"
},
"table": {
"table_name": "df",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.20",
"prefix_cost": "0.00",
"data_read_per_join": "432"
},
"used_columns": [
"feature_id",
"status"
]
}
}
}
]
}
},
{
"table": {
"table_name": "fd",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id",
"lang_code"
],
"key_length": "9",
"ref": [
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 53,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "10.60",
"prefix_cost": "138.81",
"data_read_per_join": "81K"
},
"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": [
"portal.v.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 53,
"filtered": "100.00",
"cost_info": {
"read_cost": "53.00",
"eval_cost": "10.60",
"prefix_cost": "202.41",
"data_read_per_join": "60K"
},
"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": [
"portal.fv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 53,
"filtered": "100.00",
"cost_info": {
"read_cost": "53.00",
"eval_cost": "10.60",
"prefix_cost": "266.01",
"data_read_per_join": "160K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
},
{
"table": {
"table_name": "gf",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 53,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "10.60",
"prefix_cost": "277.61",
"data_read_per_join": "22K"
},
"used_columns": [
"feature_id",
"feature_type",
"position"
],
"attached_condition": "<if>(is_not_null_compl(gf), (`portal`.`gf`.`feature_type` = 'G'), true)"
}
}
]
}
}
}
Result
product_id |
feature_id |
value |
value_int |
variant_id |
feature_type |
description |
prefix |
parent_id |
position |
gposition |
variant |
suffix |
47681 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47725 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47695 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47737 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47710 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47766 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47745 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47682 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47730 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47696 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47738 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47711 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47746 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47773 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47683 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47731 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47702 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47739 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47712 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47747 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47774 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47684 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47732 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47705 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47740 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47714 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47748 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47719 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47685 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47733 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47706 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47741 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47749 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47720 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47688 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47734 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47707 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47742 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47750 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47721 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47691 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47735 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47708 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47743 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47679 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47751 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47680 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47722 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47694 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47736 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47709 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47752 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|
47744 |
2 |
|
|
7652 |
E |
Brand |
|
1 |
0 |
1 |
Bestway |
|