Query time 0.00376
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "6.67"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "3.67"
},
"nested_loop": [
{
"table": {
"table_name": "a",
"access_type": "ALL",
"rows_examined_per_scan": 5,
"rows_produced_per_join": 2,
"filtered": "40.00",
"cost_info": {
"read_cost": "0.81",
"eval_cost": "0.20",
"prefix_cost": "1.01",
"data_read_per_join": "208"
},
"used_columns": [
"currency_id",
"currency_code",
"after",
"symbol",
"coefficient",
"is_primary",
"position",
"decimals_separator",
"thousands_separator",
"decimals",
"status"
],
"attached_condition": "(`test_uchur_k`.`a`.`status` in ('A','H'))"
}
},
{
"table": {
"table_name": "b",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"currency_id",
"lang_code"
],
"key_length": "9",
"ref": [
"test_uchur_k.a.currency_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.50",
"eval_cost": "0.20",
"prefix_cost": "1.71",
"data_read_per_join": "1K"
},
"used_columns": [
"currency_id",
"description",
"lang_code"
]
}
},
{
"table": {
"table_name": "storefronts_currencies",
"access_type": "index",
"key": "PRIMARY",
"used_key_parts": [
"storefront_id",
"currency_id"
],
"key_length": "8",
"rows_examined_per_scan": 6,
"rows_produced_per_join": 3,
"filtered": "30.56",
"using_index": true,
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "0.93",
"eval_cost": "0.37",
"prefix_cost": "3.01",
"data_read_per_join": "58"
},
"used_columns": [
"storefront_id",
"currency_id"
],
"attached_condition": "(<if>(found_match(storefronts_currencies), ((`test_uchur_k`.`storefronts_currencies`.`storefront_id` = 1) or (`test_uchur_k`.`storefronts_currencies`.`storefront_id` is null)), true) and <if>(is_not_null_compl(storefronts_currencies), (`test_uchur_k`.`storefronts_currencies`.`currency_id` = `test_uchur_k`.`a`.`currency_id`), true))"
}
}
]
}
}
}
Result
| currency_id |
currency_code |
after |
symbol |
coefficient |
is_primary |
position |
decimals_separator |
thousands_separator |
decimals |
status |
description |
| 5 |
KZT |
Y |
₸ |
1.00000 |
Y |
0 |
. |
|
2 |
A |
Казахстанский тенге |
| 4 |
RUB |
Y |
₽ |
6.48499 |
N |
10 |
. |
|
2 |
A |
Рубли |