Query time 0.02273
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": "product_id",
"key_length": "3",
"used_key_parts": ["product_id"],
"rowid_filter": {
"range": {
"key": "fl",
"used_key_parts": ["feature_id", "lang_code"]
},
"rows": 146,
"selectivity_pct": 0.092369986
},
"rows": 99,
"filtered": 0.092369989,
"index_condition": "pfv.product_id in (854,35242,35167,35174,35176,35172,35171,18264,632,35166,35169,49811,44281,41292,47012,1089,41291,33702,41294)",
"attached_condition": "pfv.feature_id in (22036,23532,23527,23531,23533,23530,23529,20263,22178,23526,23528,24745,24481,25064,24744,21892,25065,23483,25066) and pfv.lang_code = 'vi'"
}
},
{
"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 |
22178 |
632 |
77668 |
0 |
Mẫu 4 |
22036 |
854 |
77120 |
3 |
Standard 6mm |
21892 |
1089 |
76633 |
0 |
Kẹp tóc chữ nhật thêu hoa ngẫu nhiên |
20263 |
18264 |
70905 |
0 |
Almond Blossom |
23483 |
33702 |
81491 |
1 |
Vàng |
23526 |
35166 |
81655 |
1 |
Bông tai |
23527 |
35167 |
81657 |
1 |
Bông tai |
23528 |
35169 |
81660 |
1 |
Bông tai |
23529 |
35171 |
81663 |
1 |
Bông tai |
23530 |
35172 |
81665 |
1 |
Set 1 |
23531 |
35174 |
81667 |
1 |
Dây chuyền |
23533 |
35176 |
81672 |
1 |
Dây dài 12-15cm |
23532 |
35242 |
81671 |
3 |
Set dây chuyền, bông tai kèm hộp gỗ |
25065 |
41291 |
87457 |
0 |
Size S |
25064 |
41292 |
87455 |
0 |
Size S |
25066 |
41294 |
87459 |
0 |
Size S |
24481 |
44281 |
85392 |
1 |
Cam đất |
24744 |
47012 |
86297 |
1 |
Size S |
24745 |
49811 |
87462 |
1 |
Bạc - Size S |