Query time 0.00045
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "56.21"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 141,
"rows_produced_per_join": 20,
"filtered": "14.89",
"cost_info": {
"read_cost": "26.81",
"eval_cost": "4.20",
"prefix_cost": "31.01",
"data_read_per_join": "23K"
},
"used_columns": [
"variant_id",
"position"
],
"attached_condition": "(`atulecarter_atul_demo2`.`pfv`.`variant_id` in (1194,1199,1202,1193,1197,1200,1195,1196,1201,1203,1213,1209,1210,1211,1212,1198,1204,1205,1206,1207,1208))"
}
},
{
"table": {
"table_name": "pfvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"atulecarter_atul_demo2.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 20,
"filtered": "100.00",
"cost_info": {
"read_cost": "21.00",
"eval_cost": "4.20",
"prefix_cost": "56.21",
"data_read_per_join": "63K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| variant_id |
position |
variant |
| 1213 |
0 |
Brand 5 |
| 1212 |
4 |
Brand 4 |
| 1211 |
3 |
Brand 3 |
| 1210 |
2 |
Brand 2 |
| 1209 |
1 |
Brand 1 |
| 1193 |
1 |
Small |
| 1194 |
2 |
Large |
| 1195 |
3 |
Medium |
| 1196 |
6 |
XX Large |
| 1197 |
5 |
X Large |
| 1198 |
1 |
Green |
| 1199 |
2 |
Blue |
| 1200 |
3 |
Black |
| 1201 |
4 |
White |
| 1202 |
1 |
demo1 |
| 1203 |
2 |
demo2 |
| 1204 |
1 |
demo1 |
| 1205 |
2 |
pkj |
| 1206 |
6 |
hjhj |
| 1207 |
1 |
demo1 |
| 1208 |
6 |
9hb |