Query time 0.00872
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": 159,
"filtered": 0.40526548,
"attached_condition": "pfv.feature_id in (21596,24231,24620,24744,23775,23350,24980,23774,25065,19612,23616,24209) and pfv.product_id in (1535,41429,45508,47012,37098,26892,48998,37092,41291,6611,26880,35740,41279) 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 |
21596 |
1535 |
75519 |
0 |
Túi 250gr |
19612 |
6611 |
68205 |
0 |
125g |
23350 |
26880 |
81002 |
1 |
Không mùi |
23350 |
26892 |
81002 |
1 |
Không mùi |
23616 |
35740 |
81883 |
1 |
Vàng cam |
23774 |
37092 |
82577 |
1 |
Ocean Breeze |
23775 |
37098 |
82591 |
1 |
Sweet Dream |
24209 |
41279 |
84347 |
1 |
50g |
25065 |
41291 |
87457 |
0 |
Size S |
24231 |
41429 |
84426 |
1 |
Đỏ |
24620 |
45508 |
85929 |
1 |
Hình khối nhiều màu |
24744 |
47012 |
86297 |
1 |
Size S |
24980 |
48998 |
87124 |
0 |
Da tổng hợp |