Query time 0.02711
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": 117,
"filtered": 0.036018625,
"attached_condition": "pfv.feature_id in (23912,22085,24774,21949,24769,24825,23645,23629,21271,25022,25100) and pfv.product_id in (38128,786,47260,984,47256,47570,35697,35712,2047,50039) 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 |
22085 |
786 |
77301 |
0 |
Bông tai |
21949 |
984 |
76840 |
0 |
Charming Rocket |
21271 |
2047 |
74429 |
0 |
Màu Đen Trơn |
23645 |
35697 |
81987 |
1 |
Moony 1 |
23629 |
35712 |
81947 |
1 |
Bliss 1 |
23912 |
38128 |
83173 |
1 |
Xám đậm |
24769 |
47256 |
86388 |
1 |
Màu đen |
24774 |
47260 |
86408 |
1 |
Trắng viền xanh rêu |
24825 |
47570 |
86575 |
1 |
Gối thiền |
25022 |
50039 |
87281 |
0 |
Đậm |
25100 |
50039 |
87629 |
3 |
Size A3 |