Query time 0.01117
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "101.40"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "36.00"
},
"nested_loop": [
{
"table": {
"table_name": "a",
"access_type": "ref",
"possible_keys": [
"cs",
"country_code"
],
"key": "cs",
"used_key_parts": [
"country_code"
],
"key_length": "8",
"ref": [
"const"
],
"rows_examined_per_scan": 36,
"rows_produced_per_join": 36,
"filtered": "100.00",
"cost_info": {
"read_cost": "15.00",
"eval_cost": "7.20",
"prefix_cost": "22.20",
"data_read_per_join": "3K"
},
"used_columns": [
"state_id",
"country_code",
"code"
]
}
},
{
"table": {
"table_name": "b",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"state_id",
"lang_code"
],
"key_length": "9",
"ref": [
"jmj_test.a.state_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 36,
"filtered": "100.00",
"cost_info": {
"read_cost": "36.00",
"eval_cost": "7.20",
"prefix_cost": "65.40",
"data_read_per_join": "54K"
},
"used_columns": [
"state_id",
"lang_code",
"state"
]
}
}
]
}
}
}
Result
| code |
state |
| AN |
Andaman and Nicobar Islands |
| AP |
Andhra Pradesh |
| AR |
Arunachal Pradesh |
| AS |
Assam |
| BR |
Bihar |
| CH |
Chandigarh |
| CG |
Chhattisgarh |
| DN |
Dadra and Nagar Haveli |
| DD |
Daman and Diu |
| DL |
Delhi |
| GA |
Goa |
| GJ |
Gujarat |
| HR |
Haryana |
| HP |
Himachal Pradesh |
| JK |
Jammu and Kashmir |
| JH |
Jharkhand |
| KA |
Karnataka |
| KL |
Kerala |
| LK |
Ladakh |
| LD |
Lakshadweep |
| MP |
Madhya Pradesh |
| MH |
Maharashtra |
| MN |
Manipur |
| ML |
Meghalaya |
| MZ |
Mizoram |
| NL |
Nagaland |
| OR |
Orissa |
| PY |
Pondicherry |
| PB |
Punjab |
| RJ |
Rajasthan |
| SK |
Sikkim |
| TN |
Tamil Nadu |
| TS |
Telangana |
| TR |
Tripura |
| UP |
Uttar Pradesh |
| UK |
Uttarakhand |
| WB |
West Bengal |