Query time 0.00417
JSON explain
{
"query_block": {
"select_id": 1,
"nested_loop": [
{
"table": {
"table_name": "fv",
"access_type": "ref",
"possible_keys": ["PRIMARY", "feature_id"],
"key": "feature_id",
"key_length": "3",
"used_key_parts": ["feature_id"],
"ref": ["const"],
"rows": 3,
"filtered": 100
}
},
{
"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.fv.variant_id", "const"],
"rows": 1,
"filtered": 100,
"index_condition": "fvd.lang_code = 'vi'"
}
},
{
"table": {
"table_name": "pfv",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "variant_id",
"key_length": "3",
"used_key_parts": ["variant_id"],
"ref": ["dev_db.fv.variant_id"],
"rowid_filter": {
"range": {
"key": "fpl",
"used_key_parts": ["feature_id", "product_id", "lang_code"]
},
"rows": 6,
"selectivity_pct": 0.003796027
},
"rows": 10,
"filtered": 0.003796027,
"attached_condition": "pfv.feature_id = 24191 and pfv.product_id in (41123,37885,41112,41130,37881,41124) and pfv.lang_code = 'vi'"
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
24191 |
37885 |
84291 |
1 |
Twilly 120cm x 5cm |
24191 |
37881 |
84291 |
1 |
Twilly 120cm x 5cm |
24191 |
41112 |
84292 |
2 |
60cm x 60cm |
24191 |
41124 |
84292 |
2 |
60cm x 60cm |
24191 |
41130 |
84292 |
2 |
60cm x 60cm |
24191 |
41123 |
84293 |
3 |
90cm x 90cm |