Query time 0.00984
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "296.27"
},
"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": 94,
"rows_produced_per_join": 93,
"filtered": "99.97",
"index_condition": "(`jmj_test`.`v`.`product_id` in (1691,1071,1138,1139,1142,1146,1563))",
"cost_info": {
"read_cost": "119.82",
"eval_cost": "18.79",
"prefix_cost": "138.61",
"data_read_per_join": "72K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"value",
"value_int",
"lang_code"
],
"attached_condition": "((`jmj_test`.`v`.`lang_code` = 'en') and (`jmj_test`.`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": [
"jmj_test.v.feature_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "9.95",
"cost_info": {
"read_cost": "93.97",
"eval_cost": "1.87",
"prefix_cost": "251.38",
"data_read_per_join": "4K"
},
"used_columns": [
"feature_id",
"feature_type",
"categories_path",
"parent_id",
"display_on_catalog",
"status",
"position"
],
"attached_condition": "((`jmj_test`.`f`.`status` = 'A') and (`jmj_test`.`f`.`display_on_catalog` = 'Y') and ((`jmj_test`.`f`.`categories_path` = '') or find_in_set(3,`jmj_test`.`f`.`categories_path`) or find_in_set(25,`jmj_test`.`f`.`categories_path`) or find_in_set(28,`jmj_test`.`f`.`categories_path`)) and (if(`jmj_test`.`f`.`parent_id`,(/* select#2 */ select `jmj_test`.`df`.`status` from `jmj_test`.`jmj_product_features` `df` where (`jmj_test`.`df`.`feature_id` = `jmj_test`.`f`.`parent_id`)),'A') = 'A') and ((`jmj_test`.`v`.`variant_id` <> 0) or ((`jmj_test`.`f`.`feature_type` <> 'C') and (`jmj_test`.`v`.`value` <> '')) or (`jmj_test`.`f`.`feature_type` = 'C') or (`jmj_test`.`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": [
"jmj_test.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": "440"
},
"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": [
"jmj_test.v.feature_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "9.35",
"eval_cost": "1.87",
"prefix_cost": "262.60",
"data_read_per_join": "21K"
},
"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": [
"jmj_test.v.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "9.35",
"eval_cost": "1.87",
"prefix_cost": "273.82",
"data_read_per_join": "14K"
},
"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": [
"jmj_test.fv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "9.35",
"eval_cost": "1.87",
"prefix_cost": "285.04",
"data_read_per_join": "28K"
},
"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": [
"jmj_test.f.parent_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "9.35",
"eval_cost": "1.87",
"prefix_cost": "296.27",
"data_read_per_join": "4K"
},
"used_columns": [
"feature_id",
"feature_type",
"position"
],
"attached_condition": "<if>(is_not_null_compl(gf), (`jmj_test`.`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 |
| 1691 |
280 |
|
|
2103 |
S |
Color |
|
|
black |
0 |
5000 |
|
| 1071 |
280 |
|
|
2103 |
S |
Color |
|
|
black |
0 |
5000 |
|
| 1139 |
280 |
|
|
2103 |
S |
Color |
|
|
black |
0 |
5000 |
|
| 1071 |
280 |
|
|
2104 |
S |
Color |
|
|
dimgray |
0 |
5000 |
|
| 1139 |
280 |
|
|
2104 |
S |
Color |
|
|
dimgray |
0 |
5000 |
|
| 1138 |
280 |
|
|
2105 |
S |
Color |
|
|
gray |
0 |
5000 |
|
| 1691 |
280 |
|
|
2109 |
S |
Color |
|
|
gainsboro |
0 |
5000 |
|
| 1563 |
280 |
|
|
2111 |
S |
Color |
|
|
slategray |
0 |
5000 |
|
| 1142 |
280 |
|
|
2112 |
S |
Color |
|
|
midnightblue |
0 |
5000 |
|
| 1146 |
280 |
|
|
2113 |
S |
Color |
|
|
navy |
0 |
5000 |
|
| 1071 |
280 |
|
|
2113 |
S |
Color |
|
|
navy |
0 |
5000 |
|
| 1139 |
280 |
|
|
2114 |
S |
Color |
|
|
darkblue |
0 |
5000 |
|
| 1071 |
280 |
|
|
2116 |
S |
Color |
|
|
blue |
0 |
5000 |
|
| 1071 |
280 |
|
|
2128 |
S |
Color |
|
|
aliceblue |
0 |
5000 |
|
| 1138 |
280 |
|
|
2129 |
S |
Color |
|
|
ghostwhite |
0 |
5000 |
|
| 1138 |
280 |
|
|
2131 |
S |
Color |
|
|
lightcyan |
0 |
5000 |
|
| 1138 |
280 |
|
|
2135 |
S |
Color |
|
|
aquamarine |
0 |
5000 |
|
| 1563 |
280 |
|
|
2139 |
S |
Color |
|
|
lightseagreen |
0 |
5000 |
|
| 1146 |
280 |
|
|
2143 |
S |
Color |
|
|
darkslategray |
0 |
5000 |
|
| 1142 |
280 |
|
|
2143 |
S |
Color |
|
|
darkslategray |
0 |
5000 |
|
| 1138 |
280 |
|
|
2154 |
S |
Color |
|
|
yellowgreen |
0 |
5000 |
|
| 1691 |
280 |
|
|
2166 |
S |
Color |
|
|
lightgoldenrodyellow |
0 |
5000 |
|
| 1563 |
280 |
|
|
2167 |
S |
Color |
|
|
lightyellow |
0 |
5000 |
|
| 1071 |
280 |
|
|
2178 |
S |
Color |
|
|
palegoldenrod |
0 |
5000 |
|
| 1071 |
280 |
|
|
2183 |
S |
Color |
|
|
burlywood |
0 |
5000 |
|
| 1071 |
280 |
|
|
2184 |
S |
Color |
|
|
tan |
0 |
5000 |
|
| 1139 |
280 |
|
|
2185 |
S |
Color |
|
|
darkkhaki |
0 |
5000 |
|
| 1691 |
280 |
|
|
2186 |
S |
Color |
|
|
goldenrod |
0 |
5000 |
|
| 1071 |
280 |
|
|
2187 |
S |
Color |
|
|
darkgoldenrod |
0 |
5000 |
|
| 1138 |
280 |
|
|
2188 |
S |
Color |
|
|
peru |
0 |
5000 |
|
| 1139 |
280 |
|
|
2190 |
S |
Color |
|
|
saddlebrown |
0 |
5000 |
|
| 1563 |
280 |
|
|
2195 |
S |
Color |
|
|
darksalmon |
0 |
5000 |
|
| 1071 |
280 |
|
|
2196 |
S |
Color |
|
|
sandybrown |
0 |
5000 |
|
| 1071 |
280 |
|
|
2201 |
S |
Color |
|
|
red |
0 |
5000 |
|
| 1139 |
280 |
|
|
2204 |
S |
Color |
|
|
darkred |
0 |
5000 |
|
| 1146 |
280 |
|
|
2205 |
S |
Color |
|
|
maroon |
0 |
5000 |
|
| 1138 |
280 |
|
|
2205 |
S |
Color |
|
|
maroon |
0 |
5000 |
|
| 1139 |
280 |
|
|
2205 |
S |
Color |
|
|
maroon |
0 |
5000 |
|
| 1139 |
280 |
|
|
2207 |
S |
Color |
|
|
mistyrose |
0 |
5000 |
|
| 1139 |
280 |
|
|
2213 |
S |
Color |
|
|
crimson |
0 |
5000 |
|
| 1071 |
280 |
|
|
2213 |
S |
Color |
|
|
crimson |
0 |
5000 |
|
| 1071 |
280 |
|
|
2222 |
S |
Color |
|
|
indigo |
0 |
5000 |
|
| 1563 |
280 |
|
|
2223 |
S |
Color |
|
|
darkmagenta |
0 |
5000 |
|
| 1139 |
280 |
|
|
2231 |
S |
Color |
|
|
lavenderblush |
0 |
5000 |
|
| 1071 |
280 |
|
|
2232 |
S |
Color |
|
|
oldlace |
0 |
5000 |
|
| 1139 |
280 |
|
|
2233 |
S |
Color |
|
|
linen |
0 |
5000 |
|
| 1071 |
280 |
|
|
2235 |
S |
Color |
|
|
floralwhite |
0 |
5000 |
|
| 1691 |
280 |
|
|
2239 |
S |
Color |
|
|
white |
0 |
5000 |
|
| 1138 |
133 |
|
|
2243 |
M |
Size |
|
|
36 |
0 |
4999 |
|
| 1142 |
133 |
|
|
2243 |
M |
Size |
|
|
36 |
0 |
4999 |
|
| 1146 |
133 |
|
|
2243 |
M |
Size |
|
|
36 |
0 |
4999 |
|
| 1139 |
133 |
|
|
2243 |
M |
Size |
|
|
36 |
0 |
4999 |
|
| 1071 |
133 |
|
|
2243 |
M |
Size |
|
|
36 |
0 |
4999 |
|
| 1071 |
133 |
|
|
2244 |
M |
Size |
|
|
38 |
0 |
4999 |
|
| 1138 |
133 |
|
|
2244 |
M |
Size |
|
|
38 |
0 |
4999 |
|
| 1142 |
133 |
|
|
2244 |
M |
Size |
|
|
38 |
0 |
4999 |
|
| 1146 |
133 |
|
|
2244 |
M |
Size |
|
|
38 |
0 |
4999 |
|
| 1139 |
133 |
|
|
2244 |
M |
Size |
|
|
38 |
0 |
4999 |
|
| 1146 |
133 |
|
|
2245 |
M |
Size |
|
|
40 |
0 |
4999 |
|
| 1139 |
133 |
|
|
2245 |
M |
Size |
|
|
40 |
0 |
4999 |
|
| 1138 |
133 |
|
|
2245 |
M |
Size |
|
|
40 |
0 |
4999 |
|
| 1071 |
133 |
|
|
2245 |
M |
Size |
|
|
40 |
0 |
4999 |
|
| 1142 |
133 |
|
|
2245 |
M |
Size |
|
|
40 |
0 |
4999 |
|
| 1138 |
133 |
|
|
2246 |
M |
Size |
|
|
42 |
0 |
4999 |
|
| 1142 |
133 |
|
|
2246 |
M |
Size |
|
|
42 |
0 |
4999 |
|
| 1146 |
133 |
|
|
2246 |
M |
Size |
|
|
42 |
0 |
4999 |
|
| 1139 |
133 |
|
|
2246 |
M |
Size |
|
|
42 |
0 |
4999 |
|
| 1071 |
133 |
|
|
2246 |
M |
Size |
|
|
42 |
0 |
4999 |
|
| 1142 |
133 |
|
|
2247 |
M |
Size |
|
|
44 |
0 |
4999 |
|
| 1139 |
133 |
|
|
2247 |
M |
Size |
|
|
44 |
0 |
4999 |
|
| 1071 |
133 |
|
|
2247 |
M |
Size |
|
|
44 |
0 |
4999 |
|
| 1071 |
133 |
|
|
2248 |
M |
Size |
|
|
46 |
0 |
4999 |
|
| 1139 |
133 |
|
|
2248 |
M |
Size |
|
|
46 |
0 |
4999 |
|
| 1563 |
133 |
|
|
2249 |
M |
Size |
|
|
XS |
0 |
4999 |
|
| 1691 |
133 |
|
|
768 |
M |
Size |
|
|
S |
0 |
4999 |
|
| 1563 |
133 |
|
|
768 |
M |
Size |
|
|
S |
0 |
4999 |
|
| 1563 |
133 |
|
|
769 |
M |
Size |
|
|
M |
0 |
4999 |
|
| 1691 |
133 |
|
|
769 |
M |
Size |
|
|
M |
0 |
4999 |
|
| 1563 |
133 |
|
|
2250 |
M |
Size |
|
|
L |
0 |
4999 |
|
| 1691 |
133 |
|
|
2250 |
M |
Size |
|
|
L |
0 |
4999 |
|
| 1563 |
133 |
|
|
2251 |
M |
Size |
|
|
FS |
0 |
4999 |
|
| 1691 |
133 |
|
|
771 |
M |
Size |
|
|
XXL |
0 |
4999 |
|
| 1691 |
133 |
|
|
3156 |
M |
Size |
|
|
XL |
0 |
4999 |
|