Query time 0.00647
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": 252,
"filtered": 0.493028253,
"attached_condition": "pfv.feature_id in (20196,21418,21051,21310,22570,24630,24183,21311,24191,24438,23218,24229,20939,21315,19837) and pfv.product_id in (4812,1852,2464,1996,2251,45282,40929,1995,41138,43651,31741,41427,2640,1991,5963) 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 |
19837 |
5963 |
68974 |
0 |
Tâm |
20196 |
4812 |
70669 |
0 |
Size 36 (24cm) |
20939 |
2640 |
73132 |
0 |
Xanh lá |
21051 |
2464 |
73514 |
0 |
70g |
21310 |
1996 |
74554 |
0 |
2ml |
21311 |
1995 |
74557 |
0 |
2ml |
21315 |
1991 |
74569 |
0 |
2ml |
21418 |
1852 |
74937 |
0 |
Hồng hoa văn trắng |
22570 |
2251 |
79223 |
0 |
RADERMECKER |
23218 |
31741 |
80523 |
1 |
Trắng kem |
24183 |
40929 |
84256 |
1 |
Hũ xanh nhạt hương rêu |
24191 |
41138 |
84292 |
2 |
60cm x 60cm |
24229 |
41427 |
84418 |
1 |
Đỏ |
24438 |
43651 |
85235 |
1 |
Mẫu 1 |
24630 |
45282 |
85973 |
1 |
Kem |