Query time 0.03502
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": 282,
"filtered": 0.016709697,
"attached_condition": "pfv.feature_id in (20322,23646,24313,24310,23726,19675,19981,22102,24546,24299,24312,22632,22627,19984,24309,24501) and pfv.product_id in (4287,35690,42187,42182,36522,6481,5599,24715,44940,42168,42186,27078,27076,5596,42181,44599) and pfv.lang_code = 'en'",
"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 = 'en'"
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
19675 |
6481 |
68418 |
0 |
Họa tiết con chim |
19981 |
5599 |
69836 |
0 |
Yellow |
19984 |
5596 |
69846 |
0 |
Purple |
20322 |
4287 |
71080 |
0 |
Metallic pink & green |
22102 |
24715 |
77372 |
0 |
Purple and Dark Green |
22627 |
27076 |
79256 |
0 |
Buckle |
22632 |
27078 |
79266 |
0 |
Buckle |
23646 |
35690 |
81991 |
1 |
White mother of pearl inlay |
23726 |
36522 |
82357 |
1 |
Black |
24299 |
42168 |
84670 |
1 |
Design 1 |
24309 |
42181 |
84701 |
1 |
Model 1 |
24310 |
42182 |
84703 |
1 |
Model 1 |
24312 |
42186 |
84708 |
1 |
Model 1 |
24313 |
42187 |
84712 |
1 |
Model 1 |
24501 |
44599 |
85471 |
2 |
Orange flowers 3cm |
24546 |
44940 |
85610 |
1 |
20mm |