Query time 0.00051
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "5.61"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"access_type": "range",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"rows_examined_per_scan": 7,
"rows_produced_per_join": 7,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.46",
"eval_cost": "0.70",
"prefix_cost": "3.16",
"data_read_per_join": "7K"
},
"used_columns": [
"variant_id",
"position"
],
"attached_condition": "(`aomnia_com`.`pfv`.`variant_id` in (1209,1322,1198,1250,1252,1253,1254))"
}
},
{
"table": {
"table_name": "pfvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"aomnia_com.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 7,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.75",
"eval_cost": "0.70",
"prefix_cost": "5.61",
"data_read_per_join": "21K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| variant_id |
position |
variant |
| 1198 |
1 |
Green |
| 1209 |
6 |
Pink |
| 1250 |
2 |
3-6 Months |
| 1252 |
4 |
9-12 Months |
| 1253 |
5 |
12-18 Months |
| 1254 |
6 |
18-24 Months |
| 1322 |
0 |
Gray |