Query time 0.00035
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "32.41"
},
"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": 9,
"rows_produced_per_join": 9,
"filtered": "100.00",
"index_condition": "(`cscart`.`pfv`.`variant_id` in (1301,1224,1281,1280,1223,1292,1293,1201,1199))",
"cost_info": {
"read_cost": "19.81",
"eval_cost": "1.80",
"prefix_cost": "21.61",
"data_read_per_join": "10K"
},
"used_columns": [
"variant_id",
"position"
]
}
},
{
"table": {
"table_name": "pfvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscart.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "9.00",
"eval_cost": "1.80",
"prefix_cost": "32.41",
"data_read_per_join": "28K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| variant_id |
position |
variant |
| 1199 |
6 |
Оранжевый |
| 1201 |
8 |
Коричневый |
| 1223 |
1 |
Бежевый |
| 1224 |
3 |
Серый |
| 1280 |
0 |
Синий |
| 1281 |
0 |
Темно серый |
| 1292 |
0 |
Желтый |
| 1293 |
0 |
Зеленый |
| 1301 |
0 |
Персиковый |