Query time 0.00391
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.40"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"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": 41,
"rows_produced_per_join": 8,
"filtered": "21.16",
"index_condition": "(`cscartdb`.`pfv`.`product_id` in (26620,17379,19139,19079,19134,19151,19294,26799,19220,19069,18910,16049,18489,19187,19300,19203,18997,18896,17145,19254,18825,19105,19233))",
"cost_info": {
"read_cost": "23.34",
"eval_cost": "0.87",
"prefix_cost": "24.21",
"data_read_per_join": "6K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`cscartdb`.`pfv`.`feature_id` in (1071,1199,347,345,1392,1083,1086,289,348,306)) and (`cscartdb`.`pfv`.`lang_code` = 'en'))"
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"feature_id"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"cscartdb.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "2.17",
"eval_cost": "0.04",
"prefix_cost": "27.25",
"data_read_per_join": "506"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`cscartdb`.`fv`.`feature_id` = `cscartdb`.`pfv`.`feature_id`)"
}
},
{
"table": {
"table_name": "fvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscartdb.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.11",
"eval_cost": "0.04",
"prefix_cost": "27.40",
"data_read_per_join": "1K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
289 |
16049 |
1264 |
1 |
S |
306 |
17145 |
1353 |
0 |
Small |
1199 |
17379 |
4613 |
0 |
Full set/XS |
1392 |
18489 |
5566 |
0 |
Butterfly |
345 |
18489 |
1735 |
0 |
S |
1392 |
18825 |
5566 |
0 |
Butterfly |
345 |
18825 |
1735 |
0 |
S |
347 |
18896 |
4147 |
0 |
White |
345 |
18896 |
1735 |
0 |
S |
345 |
18910 |
1735 |
0 |
S |
1086 |
18910 |
4182 |
0 |
Black |
347 |
18997 |
4147 |
0 |
White |
345 |
18997 |
1735 |
0 |
S |
347 |
19069 |
4147 |
0 |
White |
345 |
19069 |
1735 |
0 |
S |
1392 |
19079 |
5566 |
0 |
Butterfly |
345 |
19079 |
1735 |
0 |
S |
348 |
19105 |
1741 |
0 |
Blue Plum |
345 |
19105 |
1735 |
0 |
S |
347 |
19134 |
4147 |
0 |
White |
345 |
19134 |
1735 |
0 |
S |
347 |
19139 |
4147 |
0 |
White |
345 |
19139 |
1735 |
0 |
S |
347 |
19151 |
4147 |
0 |
White |
345 |
19151 |
1735 |
0 |
S |
348 |
19187 |
1742 |
1 |
Floral Pink |
345 |
19187 |
1735 |
0 |
S |
1392 |
19203 |
5566 |
0 |
Butterfly |
345 |
19203 |
1735 |
0 |
S |
1083 |
19220 |
4155 |
1 |
Pink |
345 |
19220 |
1735 |
0 |
S |
1392 |
19233 |
5566 |
0 |
Butterfly |
345 |
19233 |
1735 |
0 |
S |
348 |
19254 |
1741 |
0 |
Blue Plum |
345 |
19254 |
1735 |
0 |
S |
347 |
19294 |
4147 |
0 |
White |
345 |
19294 |
1735 |
0 |
S |
347 |
19300 |
4147 |
0 |
White |
345 |
19300 |
1735 |
0 |
S |
1071 |
26620 |
3972 |
16 |
Chartreuse |
1071 |
26799 |
3984 |
14 |
Rose |