Query time 0.02941
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": 307,
"filtered": 0.55079478,
"attached_condition": "pfv.feature_id in (22036,24531,24606,23350,24205,23616,23763,23764,23351,21604,21602,21586,23352,21603,22818) and pfv.product_id in (854,44767,45446,26892,41284,35740,36762,26895,45357,23050,26894,26891,26887,23044,23017,26889,26897,23047,26876) 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 |
21586 |
23017 |
75496 |
0 |
Vani |
21602 |
23044 |
75539 |
0 |
Sweet Dream |
21603 |
23047 |
75543 |
0 |
Sweet Dream |
21604 |
23050 |
75547 |
0 |
Sweet Dream |
22036 |
854 |
77120 |
3 |
Standard 6mm |
22818 |
26876 |
79616 |
0 |
100g |
23350 |
26887 |
81002 |
1 |
Không mùi |
23350 |
26889 |
81002 |
1 |
Không mùi |
23350 |
26891 |
81002 |
1 |
Không mùi |
23350 |
26892 |
81002 |
1 |
Không mùi |
23350 |
26894 |
81002 |
1 |
Không mùi |
23350 |
26895 |
81002 |
1 |
Không mùi |
23350 |
26897 |
81002 |
1 |
Không mùi |
23351 |
26895 |
81011 |
1 |
Purple |
23352 |
26889 |
81014 |
1 |
Vàng |
23616 |
35740 |
81883 |
1 |
Vàng cam |
23763 |
36762 |
82509 |
1 |
Thiệp nâu |
23764 |
36762 |
82511 |
1 |
Nhỏ |
24205 |
41284 |
84339 |
1 |
100g |
24531 |
44767 |
85566 |
1 |
Mùi Ruby |
24606 |
45357 |
85863 |
1 |
Lemongrass |
24606 |
45446 |
85872 |
10 |
Summer tea |