Query time 0.00043
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "10.14"
},
"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": "lang_code",
"used_key_parts": [
"lang_code",
"feature_id",
"product_id"
],
"key_length": "12",
"rows_examined_per_scan": 12,
"rows_produced_per_join": 12,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.47",
"eval_cost": "1.20",
"prefix_cost": "2.67",
"data_read_per_join": "9K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`shoptheindependents_com`.`pfv`.`feature_id` in (138,145,136,149)) and (`shoptheindependents_com`.`pfv`.`product_id` in (3077,3075,3022)) and (`shoptheindependents_com`.`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": [
"shoptheindependents_com.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "78.05",
"cost_info": {
"read_cost": "3.00",
"eval_cost": "0.94",
"prefix_cost": "6.87",
"data_read_per_join": "10K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`shoptheindependents_com`.`fv`.`feature_id` = `shoptheindependents_com`.`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": [
"shoptheindependents_com.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.34",
"eval_cost": "0.94",
"prefix_cost": "10.15",
"data_read_per_join": "28K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 136 |
3022 |
635 |
3 |
L |
| 138 |
3022 |
611 |
0 |
Black |
| 138 |
3075 |
609 |
0 |
White |
| 138 |
3077 |
638 |
0 |
Multi-Color |
| 145 |
3075 |
639 |
0 |
8 |
| 145 |
3077 |
639 |
0 |
8 |
| 149 |
3022 |
656 |
0 |
Long |