Query time 0.00201
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "22.30"
},
"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": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id",
"feature_id",
"lang_code"
],
"key_length": "12",
"rows_examined_per_scan": 33,
"rows_produced_per_join": 33,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.88",
"eval_cost": "3.30",
"prefix_cost": "7.18",
"data_read_per_join": "25K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`dev_yourmart_co_bw`.`pfv`.`feature_id` in (551,578,580)) and (`dev_yourmart_co_bw`.`pfv`.`product_id` in (4195,4202,4367,3934,3970,4065,4089,4093,4097,4052,4010)) and (`dev_yourmart_co_bw`.`pfv`.`lang_code` = 'en'))"
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"feature_id"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"dev_yourmart_co_bw.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 10,
"filtered": "30.89",
"cost_info": {
"read_cost": "8.25",
"eval_cost": "1.02",
"prefix_cost": "18.73",
"data_read_per_join": "11K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`dev_yourmart_co_bw`.`fv`.`feature_id` = `dev_yourmart_co_bw`.`pfv`.`feature_id`)"
}
},
{
"table": {
"table_name": "fvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"dev_yourmart_co_bw.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 10,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.55",
"eval_cost": "1.02",
"prefix_cost": "22.30",
"data_read_per_join": "30K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
578 |
3934 |
1498 |
0 |
Stripe |
578 |
3970 |
1504 |
0 |
Star |
580 |
4010 |
1540 |
0 |
66cm x 23cm x 23cm |
551 |
4052 |
1554 |
0 |
Animal print |
551 |
4065 |
1556 |
0 |
Batik |
551 |
4089 |
1206 |
2 |
Black |
551 |
4093 |
1564 |
0 |
Blue/green |
551 |
4097 |
1550 |
0 |
Multi colour |
551 |
4195 |
1206 |
2 |
Black |
551 |
4202 |
1207 |
1 |
White |
551 |
4367 |
1207 |
1 |
White |