Query time 0.00199
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "17.57"
},
"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": 28,
"rows_produced_per_join": 28,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.33",
"eval_cost": "2.80",
"prefix_cost": "6.13",
"data_read_per_join": "21K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`pfv`.`feature_id` in (682,656,779,771)) and (`softwarepirmam_hewadelivard_cscart_4`.`pfv`.`product_id` in (9076,9124,9816,10412,11118,11298,11392)) and (`softwarepirmam_hewadelivard_cscart_4`.`pfv`.`lang_code` = 'ar'))"
}
},
{
"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": 4,
"filtered": "16.76",
"cost_info": {
"read_cost": "7.00",
"eval_cost": "0.47",
"prefix_cost": "15.93",
"data_read_per_join": "5K"
},
"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": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.17",
"eval_cost": "0.47",
"prefix_cost": "17.57",
"data_read_per_join": "14K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 682 |
9076 |
8656 |
0 |
100ml |
| 682 |
9124 |
8656 |
0 |
100ml |
| 682 |
9816 |
8703 |
0 |
50ml |
| 656 |
10412 |
1559 |
0 |
White |
| 656 |
11118 |
1607 |
0 |
Silver |
| 656 |
11298 |
1596 |
0 |
Green |
| 771 |
11298 |
9321 |
0 |
55-20mm |
| 779 |
11298 |
9517 |
0 |
Polished Black |
| 656 |
11392 |
1682 |
33 |
Light Blue |
| 771 |
11392 |
9867 |
0 |
58-17mm |
| 779 |
11392 |
9588 |
0 |
Polished Gunmetal |