Query time 0.02516
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": 105,
"filtered": 0.02386074,
"attached_condition": "pfv.feature_id in (24571,24839,24570,24797,24769,24864,24825,23645,24870,24770) and pfv.product_id in (44951,47650,44751,47427,47256,47975,47570,35697,48026,47257) 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 |
23645 |
35697 |
81987 |
1 |
Moony 1 |
24570 |
44751 |
85760 |
1 |
Ngang |
24571 |
44951 |
85762 |
1 |
Ngang |
24769 |
47256 |
86388 |
1 |
Màu đen |
24770 |
47257 |
86391 |
1 |
Trắng be |
24797 |
47427 |
86504 |
1 |
Màu xanh lục |
24825 |
47570 |
86575 |
1 |
Gối thiền |
24839 |
47650 |
86631 |
1 |
Size S cho nữ |
24864 |
47975 |
86703 |
1 |
be grateful |
24870 |
48026 |
86733 |
1 |
be grateful |