Query time 0.00194
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "11.59"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "3.20"
},
"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": 3,
"filtered": "10.00",
"cost_info": {
"read_cost": "4.07",
"eval_cost": "0.32",
"prefix_cost": "7.27",
"data_read_per_join": "358"
},
"used_columns": [
"state_id",
"country_code",
"code",
"status"
],
"attached_condition": "(`s2cart`.`a`.`status` = 'A')"
}
},
{
"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": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.80",
"eval_cost": "0.32",
"prefix_cost": "8.39",
"data_read_per_join": "2K"
},
"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 |