Query time 0.00131
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "5.09"
},
"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": 10,
"rows_produced_per_join": 0,
"filtered": "0.50",
"index_condition": "((`aomnia_com`.`cscart_categories`.`parent_id` = 166) and (`aomnia_com`.`cscart_categories`.`category_id` <> 264))",
"cost_info": {
"read_cost": "5.01",
"eval_cost": "0.00",
"prefix_cost": "5.01",
"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 '166/%') 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.00",
"prefix_cost": "5.03",
"data_read_per_join": "193"
},
"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.00",
"prefix_cost": "5.04",
"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 |
| 321 |
166 |
166/321 |
Audio & Sound |
70 |
A |
0 |
0 |
audio |
166 |
|
|
| 1133 |
166 |
166/1133 |
Business Systems |
200 |
A |
0 |
0 |
business-systems |
166 |
|
|
| 814 |
166 |
166/814 |
Car Electronics |
180 |
A |
0 |
0 |
car-electronics |
166 |
|
|
| 803 |
166 |
166/803 |
Gaming |
160 |
A |
0 |
0 |
gaming |
166 |
|
|
| 234 |
166 |
166/234 |
Mobile Phones & Tablets |
40 |
A |
0 |
0 |
mobile-phones-and-tablets |
166 |
|
|
| 809 |
166 |
166/809 |
Office Electronics |
170 |
A |
0 |
0 |
office-electronics |
166 |
|
|
| 787 |
166 |
166/787 |
Phone Accessories |
100 |
A |
0 |
0 |
phone-accessories |
166 |
|
|
| 331 |
166 |
166/331 |
Smart Home Devices |
80 |
A |
0 |
0 |
smart-home-devices |
166 |
|
|
| 174 |
166 |
166/174 |
TV & Home Entertainment |
30 |
A |
0 |
0 |
tv-and-home-entertainment |
166 |
|
|
| 820 |
166 |
166/820 |
Wearables |
190 |
A |
0 |
0 |
wearables |
166 |
|
|