Query time 0.00216
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "30.28"
},
"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": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id",
"feature_id",
"lang_code"
],
"key_length": "12",
"rows_examined_per_scan": 52,
"rows_produced_per_join": 52,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.97",
"eval_cost": "5.20",
"prefix_cost": "11.17",
"data_read_per_join": "40K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`pfv`.`feature_id` in (656,768,766)) and (`softwarepirmam_hewadelivard_cscart_4`.`pfv`.`product_id` in (8960,9014,10128,10122,10217,11255,11277,10956,10312,10226,11280,10315,10406,10436,10486,11155,11456)) and (`softwarepirmam_hewadelivard_cscart_4`.`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": [
"softwarepirmam_hewadelivard_cscart_4.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "13.00",
"eval_cost": "0.26",
"prefix_cost": "29.37",
"data_read_per_join": "2K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`fv`.`feature_id` = `softwarepirmam_hewadelivard_cscart_4`.`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": [
"softwarepirmam_hewadelivard_cscart_4.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.65",
"eval_cost": "0.26",
"prefix_cost": "30.28",
"data_read_per_join": "7K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 656 |
8960 |
1607 |
0 |
silver |
| 768 |
8960 |
8961 |
0 |
13Kg |
| 656 |
9014 |
1607 |
0 |
silver |
| 656 |
10122 |
1560 |
0 |
Black |
| 766 |
10122 |
8551 |
30 |
50" |
| 656 |
10128 |
1560 |
0 |
Black |
| 766 |
10128 |
8558 |
70 |
65" |
| 766 |
10217 |
8553 |
90 |
75" |
| 656 |
10226 |
1560 |
0 |
Black |
| 656 |
10312 |
1560 |
0 |
Black |
| 766 |
10312 |
8557 |
40 |
55" |
| 656 |
10315 |
1560 |
0 |
Black |
| 766 |
10315 |
8558 |
70 |
65" |
| 656 |
10406 |
1559 |
0 |
white |
| 656 |
10436 |
1607 |
0 |
silver |
| 656 |
10486 |
1560 |
0 |
Black |
| 656 |
10956 |
1783 |
0 |
Dark blue |
| 656 |
11155 |
1560 |
0 |
Black |
| 656 |
11255 |
1607 |
0 |
silver |
| 656 |
11277 |
1596 |
0 |
Green |
| 656 |
11280 |
1559 |
0 |
white |
| 656 |
11456 |
1560 |
0 |
Black |