Query time 0.04902
JSON explain
{
"query_block": {
"select_id": 1,
"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",
"key_length": "12",
"used_key_parts": ["product_id", "feature_id", "lang_code"],
"rows": 183,
"filtered": 0.039840996,
"attached_condition": "pfv.feature_id in (19804,20537,24545,20004,22517,21655,23752,19923,23357,24850,19999,20107,20458) and pfv.product_id in (6063,3663,44939,5553,112,1429,36746,5834,6062,6211,5567,5141,3880,6057) and pfv.lang_code = 'en'",
"using_index": true
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "feature_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["variant_id"],
"ref": ["dev_db.pfv.variant_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "fv.feature_id = pfv.feature_id"
}
},
{
"table": {
"table_name": "fvd",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["variant_id", "lang_code"],
"ref": ["dev_db.pfv.variant_id", "const"],
"rows": 1,
"filtered": 100,
"index_condition": "fvd.lang_code = 'en'"
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
22517 |
112 |
79034 |
0 |
250gr box |
21655 |
1429 |
75729 |
0 |
Blue (70 x 70 cm) |
20537 |
3663 |
71827 |
0 |
Set 1 |
20458 |
3880 |
71566 |
0 |
Small buffalo |
20107 |
5141 |
70372 |
0 |
50g |
20004 |
5553 |
69918 |
0 |
Fine |
19999 |
5567 |
69904 |
0 |
Ground for Vietnamese phin |
19923 |
5834 |
69619 |
0 |
4 bottles |
23357 |
6057 |
81032 |
1 |
50g box |
23357 |
6062 |
81032 |
1 |
50g box |
19804 |
6063 |
68883 |
0 |
50g |
24850 |
6211 |
86656 |
1 |
34 |
23752 |
36746 |
82441 |
2 |
Bamboo Tube |
24545 |
44939 |
85607 |
1 |
16mm |