Query time 0.00111
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "26.02"
},
"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": 10,
"rows_produced_per_join": 10,
"filtered": "100.00",
"cost_info": {
"read_cost": "12.02",
"eval_cost": "2.00",
"prefix_cost": "14.02",
"data_read_per_join": "11K"
},
"used_columns": [
"variant_id",
"position"
],
"attached_condition": "(`webmarco`.`pfv`.`variant_id` in (1193,1201,1195,1194,1197,1515,1200,1199,60020,60021))"
}
},
{
"table": {
"table_name": "pfvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"webmarco.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 10,
"filtered": "100.00",
"cost_info": {
"read_cost": "10.00",
"eval_cost": "2.00",
"prefix_cost": "26.02",
"data_read_per_join": "45K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
variant_id |
position |
variant |
1193 |
0 |
S |
1194 |
30 |
L |
1195 |
20 |
M |
1197 |
50 |
XL |
1199 |
0 |
Blue |
1200 |
0 |
Black |
1201 |
0 |
White |
1515 |
0 |
Red |
60020 |
4 |
4 |
60021 |
5 |
5 |