Query time 0.00086
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "12.13"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"parent",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 5,
"rows_produced_per_join": 0,
"filtered": "2.00",
"index_condition": "((`pankajecarter_hunters`.`cscart_categories`.`category_id` <> 264) and (`pankajecarter_hunters`.`cscart_categories`.`category_id` in (166,177,179,241,242)))",
"cost_info": {
"read_cost": "11.99",
"eval_cost": "0.02",
"prefix_cost": "12.01",
"data_read_per_join": "267"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"company_id",
"storefront_id",
"usergroup_ids",
"status",
"position",
"is_trash"
],
"attached_condition": "(((`pankajecarter_hunters`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`pankajecarter_hunters`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`pankajecarter_hunters`.`cscart_categories`.`usergroup_ids`)) and (`pankajecarter_hunters`.`cscart_categories`.`status` = 'A') and (`pankajecarter_hunters`.`cscart_categories`.`parent_id` <> 264) and (`pankajecarter_hunters`.`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": [
"pankajecarter_hunters.cscart_categories.category_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.10",
"eval_cost": "0.02",
"prefix_cost": "12.13",
"data_read_per_join": "310"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
storefront_id |
| 242 |
241 |
241/242 |
Blu-ray Discs |
10 |
A |
0 |
0 |
| 166 |
0 |
166 |
Electronics |
10 |
A |
0 |
0 |
| 179 |
177 |
166/177/179 |
MP3 Players |
30 |
A |
0 |
0 |
| 177 |
166 |
166/177 |
MP3 Players |
50 |
A |
0 |
0 |
| 241 |
0 |
241 |
Movies & TV |
60 |
A |
0 |
0 |