Query time 0.01147
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": 169,
"filtered": 0.053320415,
"attached_condition": "pfv.feature_id in (23923,23538,24224,22387,20979,19665,22572,21918,20560,20654,22334,19647,19630) and pfv.product_id in (38145,35254,41422,330,20932,6529,2253,1053,3617,3374,25730,6558,31786) 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 |
22387 |
330 |
78483 |
0 |
250ml |
21918 |
1053 |
76718 |
0 |
Túi móc kem phối da đỏ sậm hình thang ngược/ 37 x 16 x 38cm |
22572 |
2253 |
79229 |
0 |
RADERMECKER |
20654 |
3374 |
72193 |
0 |
1 chai lẻ |
20560 |
3617 |
71912 |
0 |
Trầm Ven |
19665 |
6529 |
68389 |
0 |
Hộp 100g |
19647 |
6558 |
68331 |
0 |
Balance |
20979 |
20932 |
73305 |
0 |
Thùng 12 chai |
22334 |
25730 |
78280 |
0 |
Size L - 20g |
19630 |
31786 |
68258 |
9 |
Sleep Tight |
23538 |
35254 |
81686 |
2 |
Đen |
23923 |
38145 |
83205 |
1 |
Mẫu 1 |
24224 |
41422 |
84396 |
1 |
Xanh lá |