Query time 0.03384
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": "PRIMARY",
"key_length": "6",
"used_key_parts": ["feature_id", "product_id"],
"rows": 432,
"filtered": 0.027156686,
"attached_condition": "pfv.feature_id in (21228,21018,20262,23488,22438,20461,19607,21226,19811,21019,21025,20606,19997,20459,20318,21726,23237,21016,22338,19661) and pfv.product_id in (2133,2508,18260,33747,263,3877,6615,2135,6056,2507,2501,19285,5568,3879,4305,23419,31641,2510,400,6533) and pfv.lang_code = 'vi'",
"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 = 'vi'"
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
19607 |
6615 |
68195 |
0 |
125g |
19661 |
6533 |
68377 |
0 |
100g |
19811 |
6056 |
68897 |
1 |
Hộp 50g |
19997 |
5568 |
69896 |
0 |
Nguyên hạt |
20262 |
18260 |
70900 |
0 |
Pop art 1 |
20318 |
4305 |
71072 |
0 |
Size lớn |
20459 |
3879 |
71568 |
0 |
Trâu nhỏ |
20461 |
3877 |
71572 |
0 |
Trâu nhỏ |
20606 |
19285 |
72063 |
0 |
Bamboo |
21016 |
2510 |
73422 |
0 |
Lon lẻ |
21018 |
2508 |
73428 |
0 |
Lon lẻ |
21019 |
2507 |
73431 |
0 |
Chai lẻ |
21025 |
2501 |
73449 |
0 |
Chai lẻ |
21226 |
2135 |
74248 |
0 |
Chai lẻ |
21228 |
2133 |
74256 |
0 |
Chai lẻ |
21726 |
23419 |
75961 |
0 |
Đỏ |
22338 |
400 |
78292 |
0 |
Túi zip - 10g |
22438 |
263 |
78727 |
0 |
Bánh Pía Sầu Riêng Trứng Muối |
23237 |
31641 |
80587 |
1 |
70g |
23488 |
33747 |
81501 |
1 |
100g |