Query time 0.00072
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "50.47"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "32.00"
},
"nested_loop": [
{
"table": {
"table_name": "a",
"access_type": "ref",
"possible_keys": [
"cs",
"country_code"
],
"key": "country_code",
"used_key_parts": [
"country_code"
],
"key_length": "8",
"ref": [
"const"
],
"rows_examined_per_scan": 32,
"rows_produced_per_join": 32,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.07",
"eval_cost": "3.20",
"prefix_cost": "7.27",
"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": [
"s2cart.a.state_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 32,
"filtered": "100.00",
"cost_info": {
"read_cost": "8.00",
"eval_cost": "3.20",
"prefix_cost": "18.47",
"data_read_per_join": "24K"
},
"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 |
CT |
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 |
LD |
Lakshadweep |
MP |
Madhya Pradesh |
MH |
Maharashtra |
MN |
Manipur |
ML |
Meghalaya |
MZ |
Mizoram |
NL |
Nagaland |
OR |
Odisha |
PY |
Puducherry |
PB |
Punjab |
RJ |
Rajasthan |
SK |
Sikkim |
TN |
Tamil Nadu |
TG |
Telangana |
TR |
Tripura |
UP |
Uttar Pradesh |
UT |
Uttarakhand |
WB |
West Bengal |