Query time 0.00051
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "6.38"
},
"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": 11,
"rows_produced_per_join": 11,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.43",
"eval_cost": "1.10",
"prefix_cost": "2.53",
"data_read_per_join": "12K"
},
"used_columns": [
"variant_id",
"position"
],
"attached_condition": "(`cscart_db`.`pfv`.`variant_id` in (24794,27814,25181,24376,25169,24384,22004,27815,26521,27821,27822))"
}
},
{
"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": 11,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.75",
"eval_cost": "1.10",
"prefix_cost": "6.38",
"data_read_per_join": "82K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| variant_id |
position |
variant |
| 22004 |
70 |
500 gm |
| 24376 |
0 |
Pistachio |
| 24384 |
120 |
250 gm |
| 24794 |
0 |
400 gm |
| 25169 |
0 |
150 gm |
| 25181 |
0 |
100 gm |
| 26521 |
0 |
350 gm |
| 27814 |
0 |
Cashew |
| 27815 |
0 |
180 gm |
| 27821 |
0 |
Okra Chips |
| 27822 |
0 |
Sweet Corn Chips |