Query time 0.00115
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "4.64"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "0.05"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"parent",
"id_path",
"p_category_id"
],
"key": "parent",
"used_key_parts": [
"parent_id",
"category_id"
],
"key_length": "6",
"rows_examined_per_scan": 9,
"rows_produced_per_join": 0,
"filtered": "0.56",
"index_condition": "((`aomnia_com`.`cscart_categories`.`parent_id` = 968) and (`aomnia_com`.`cscart_categories`.`category_id` <> 264))",
"cost_info": {
"read_cost": "4.55",
"eval_cost": "0.01",
"prefix_cost": "4.56",
"data_read_per_join": "133"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"company_id",
"storefront_id",
"usergroup_ids",
"status",
"position"
],
"attached_condition": "(((`aomnia_com`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`aomnia_com`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`aomnia_com`.`cscart_categories`.`usergroup_ids`))) and (`aomnia_com`.`cscart_categories`.`status` = 'A') and (`aomnia_com`.`cscart_categories`.`id_path` like '968/%') and (`aomnia_com`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "cscart_category_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"lang_code"
],
"key_length": "9",
"ref": [
"aomnia_com.cscart_categories.category_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.01",
"eval_cost": "0.01",
"prefix_cost": "4.58",
"data_read_per_join": "194"
},
"used_columns": [
"category_id",
"lang_code",
"category",
"mega_m_category_banner_url",
"mega_m_category_svg_icon"
]
}
},
{
"table": {
"table_name": "cscart_seo_names",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"dispatch"
],
"key": "PRIMARY",
"used_key_parts": [
"object_id",
"type",
"dispatch",
"lang_code"
],
"key_length": "206",
"ref": [
"aomnia_com.cscart_categories.category_id",
"const",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.01",
"eval_cost": "0.01",
"prefix_cost": "4.60",
"data_read_per_join": "86"
},
"used_columns": [
"name",
"object_id",
"company_id",
"type",
"dispatch",
"path",
"lang_code"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
storefront_id |
seo_name |
seo_path |
mega_m_category_banner_url |
mega_m_category_svg_icon |
| 997 |
968 |
968/997 |
Audio & Video |
370 |
A |
0 |
0 |
audio-and-video |
968 |
|
|
| 795 |
968 |
968/795 |
Computer & Desktop Accessories |
110 |
A |
0 |
0 |
computers-and-laptops-en |
968 |
|
|
| 972 |
968 |
968/972 |
Computer Components |
120 |
A |
0 |
0 |
computer-components |
968 |
|
|
| 167 |
968 |
968/167 |
Computers |
15 |
A |
0 |
0 |
computers |
968 |
|
|
| 989 |
968 |
968/989 |
Keyboards & Mice |
140 |
A |
0 |
0 |
keyboards-and-mice |
968 |
|
|
| 982 |
968 |
968/982 |
Monitors & Displays |
130 |
A |
0 |
0 |
monitors-and-displays |
968 |
|
|
| 1003 |
968 |
968/1003 |
Networking |
380 |
A |
0 |
0 |
networking |
968 |
|
|
| 1018 |
968 |
968/1018 |
Printers & Office Tech |
410 |
A |
0 |
0 |
printers-and-office-tech |
968 |
|
|
| 1011 |
968 |
968/1011 |
Storage & Back Up |
400 |
A |
0 |
0 |
storage-and-back-up |
968 |
|
|