Query time 0.00105
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "6.06"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"variant_feature_idx",
"idx_var_feat_pos"
],
"key": "idx_var_feat_pos",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"rows_examined_per_scan": 7,
"rows_produced_per_join": 7,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.36",
"eval_cost": "0.70",
"prefix_cost": "2.06",
"data_read_per_join": "7K"
},
"used_columns": [
"variant_id",
"position"
],
"attached_condition": "(`cscart_db`.`pfv`.`variant_id` in (62222,10351,62224,62226,62227,62225,62223))"
}
},
{
"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_db.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 7,
"filtered": "100.00",
"cost_info": {
"read_cost": "3.30",
"eval_cost": "0.70",
"prefix_cost": "6.06",
"data_read_per_join": "52K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| variant_id |
position |
variant |
| 10351 |
0 |
South Korea |
| 62222 |
0 |
01 Strawberry Ade |
| 62223 |
0 |
03 Orange Ade |
| 62224 |
0 |
04 Red Grapefruit Ade |
| 62225 |
0 |
05 Grape Ade |
| 62226 |
0 |
06 Pomegranate Ade |
| 62227 |
0 |
07 Prune Ade |