Query time 0.03689
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": 400,
"filtered": 0.910036385,
"attached_condition": "pfv.feature_id in (25127,24832,20381,20511,23779,23780,25022,25021,23699,23700,20665,20539,23693,23692,20532,20990,22243,22245,20836,23777,24181,24182) and pfv.product_id in (50216,47597,18608,3713,37096,27357,36399,19386,3662,36339,3666,2553,534,25180,3004,37097,40928) 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 |
20381 |
18608 |
71339 |
0 |
Màu vàng mustard |
20511 |
3713 |
71736 |
0 |
Sapphire |
20532 |
3666 |
71798 |
0 |
Set 1 |
20539 |
3662 |
71839 |
0 |
Set 1 |
20665 |
19386 |
72223 |
0 |
Sweet Dream |
20836 |
3004 |
72795 |
0 |
Size 20 x 20 cm |
20990 |
2553 |
73333 |
0 |
Hoa tím |
22243 |
534 |
77936 |
0 |
Nâu cam |
22245 |
25180 |
77943 |
0 |
Lục giác - Nâu cam |
23692 |
36339 |
82154 |
1 |
Kích thước chuẩn |
23693 |
36339 |
82165 |
10 |
Trắng |
23699 |
36399 |
82207 |
2 |
Set 2 bao gối |
23700 |
36399 |
82217 |
10 |
Xanh Mint |
23777 |
37097 |
82616 |
1 |
Ocean Breeze |
23779 |
37096 |
82636 |
1 |
Lemongrass |
23780 |
37096 |
82652 |
1 |
Oải hương |
24181 |
40928 |
84249 |
1 |
Hộp 2 hũ nến |
24182 |
40928 |
84251 |
1 |
Sunday Morning |
24832 |
47597 |
86594 |
1 |
Sen trắng |
25021 |
27357 |
87278 |
0 |
15x20 (cỡ A5) |
25022 |
27357 |
87281 |
0 |
Đậm |
25127 |
50216 |
87712 |
2 |
A4 |