Query time 0.03874
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": 122,
"filtered": 0.035688873,
"attached_condition": "pfv.feature_id in (21115,21722,21484,21721,21965,22425,20980,20941,22504,22185,24781) and pfv.product_id in (21188,23402,1732,23401,933,278,2567,20804,26467,24988,47278) 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 |
22425 |
278 |
78671 |
0 |
Xanh lam tự nhiên với Chàm |
21965 |
933 |
76888 |
0 |
Dầu gội tinh Dầu Oải Hương |
21484 |
1732 |
75200 |
0 |
Đen |
20980 |
2567 |
73306 |
0 |
Thùng 6 chai |
20941 |
20804 |
73138 |
0 |
Cam |
21115 |
21188 |
73688 |
0 |
Santa Claus |
21721 |
23401 |
75944 |
0 |
Xanh lá phối xanh dương |
21722 |
23402 |
75946 |
0 |
Xanh lá |
22185 |
24988 |
77695 |
0 |
Son dưỡng tinh chất Gấc hương Chanh |
22504 |
26467 |
78992 |
0 |
Lân |
24781 |
47278 |
86443 |
1 |
Trắng tiêu |