Query time 0.01352
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": 354,
"filtered": 0.056452893,
"attached_condition": "pfv.feature_id in (21924,21597,24202,19924,23237,22338,19922,19643,20454,23490,22336,19795,21265,23755,20984,20981,23924,20983) and pfv.product_id in (1042,1534,41231,5833,31641,400,5835,6562,3885,33716,25733,6068,33717,36781,2563,2566,38146,2564) 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 |
19643 |
6562 |
68321 |
0 |
Balance |
19795 |
6068 |
68840 |
0 |
Vòng hoa nhí |
19922 |
5835 |
69617 |
0 |
4 chai |
19924 |
5833 |
69621 |
0 |
4 chai |
20454 |
3885 |
71556 |
0 |
Size 37 |
20981 |
2566 |
73308 |
0 |
Thùng 6 chai |
20983 |
2564 |
73312 |
0 |
Chai 500ml |
20984 |
2563 |
73314 |
0 |
Chai 500ml |
21265 |
36781 |
74391 |
0 |
Đen |
21597 |
1534 |
75521 |
0 |
Túi 250gr |
21924 |
1042 |
76739 |
0 |
Xanh cổ vịt |
22336 |
25733 |
78285 |
0 |
Size L - 20g |
22338 |
400 |
78292 |
0 |
Túi zip - 10g |
23237 |
31641 |
80587 |
1 |
70g |
23490 |
33716 |
81505 |
1 |
Size XS |
23490 |
33717 |
81505 |
1 |
Size XS |
23755 |
36781 |
82449 |
0 |
1,6m x 2m (+319,000 ₫) |
23924 |
38146 |
83207 |
1 |
Mẫu 1 |
24202 |
41231 |
84329 |
1 |
Mẫu 1 |