Query time 0.00133
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "15.66"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id",
"fl"
],
"key": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id",
"feature_id",
"lang_code"
],
"key_length": "12",
"rows_examined_per_scan": 24,
"rows_produced_per_join": 24,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.05",
"eval_cost": "2.40",
"prefix_cost": "5.45",
"data_read_per_join": "960"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`cscart_db`.`pfv`.`feature_id` in (63,104,67,74)) and (`cscart_db`.`pfv`.`product_id` in (69467,69466,69469,69465,65820,65821)) and (`cscart_db`.`pfv`.`lang_code` = 'en'))"
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"feature_id",
"variant_feature_idx",
"idx_var_feat_pos"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"cscart_db.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "14.03",
"cost_info": {
"read_cost": "6.00",
"eval_cost": "0.34",
"prefix_cost": "13.85",
"data_read_per_join": "3K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`cscart_db`.`fv`.`feature_id` = `cscart_db`.`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": [
"cscart_db.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.47",
"eval_cost": "0.34",
"prefix_cost": "15.66",
"data_read_per_join": "25K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 63 |
65820 |
10348 |
0 |
India |
| 67 |
65820 |
24760 |
0 |
7 |
| 74 |
65820 |
19150 |
0 |
Single |
| 104 |
65820 |
62099 |
0 |
Lover |
| 63 |
65821 |
10348 |
0 |
India |
| 67 |
65821 |
24760 |
0 |
7 |
| 74 |
65821 |
19150 |
0 |
Single |
| 104 |
65821 |
62100 |
0 |
ILY |
| 63 |
69465 |
10351 |
0 |
South Korea |
| 67 |
69465 |
62186 |
0 |
10.5 |
| 104 |
69465 |
62192 |
0 |
OR201 Apricot Peach Mousse |
| 63 |
69466 |
10351 |
0 |
South Korea |
| 67 |
69466 |
62186 |
0 |
10.5 |
| 104 |
69466 |
62190 |
0 |
OR202 Sweet Coral Candy |
| 63 |
69467 |
10351 |
0 |
South Korea |
| 67 |
69467 |
62186 |
0 |
10.5 |
| 104 |
69467 |
62187 |
0 |
PK002 Grapefruit Jelly |
| 63 |
69469 |
10351 |
0 |
South Korea |
| 67 |
69469 |
62186 |
0 |
10.5 |
| 104 |
69469 |
62191 |
0 |
RD301 Red Grapefruit Pudding |