Query time 0.00569
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "30.91"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "jmj_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"parent",
"id_path",
"p_category_id"
],
"key": "id_path",
"used_key_parts": [
"id_path"
],
"key_length": "767",
"rows_examined_per_scan": 21,
"rows_produced_per_join": 0,
"filtered": "2.00",
"index_condition": "(`jmj_test`.`jmj_categories`.`id_path` like '4/%')",
"cost_info": {
"read_cost": "30.33",
"eval_cost": "0.08",
"prefix_cost": "30.41",
"data_read_per_join": "1K"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"company_id",
"usergroup_ids",
"status",
"position",
"is_trash",
"ab__lc_catalog_image_control",
"storefront_id"
],
"attached_condition": "(((`jmj_test`.`jmj_categories`.`usergroup_ids` = '') or find_in_set(0,`jmj_test`.`jmj_categories`.`usergroup_ids`) or find_in_set(1,`jmj_test`.`jmj_categories`.`usergroup_ids`)) and (`jmj_test`.`jmj_categories`.`status` = 'A') and (`jmj_test`.`jmj_categories`.`category_id` <> 1) and (`jmj_test`.`jmj_categories`.`parent_id` <> 1) and (`jmj_test`.`jmj_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "jmj_category_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"lang_code"
],
"key_length": "9",
"ref": [
"jmj_test.jmj_categories.category_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.42",
"eval_cost": "0.08",
"prefix_cost": "30.91",
"data_read_per_join": "1K"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
storefront_id |
ab__lc_catalog_image_control |
| 83 |
68 |
4/68/83 |
Jeans |
10 |
A |
0 |
0 |
none |
| 104 |
82 |
4/82/104 |
Kurta |
10 |
A |
0 |
0 |
none |
| 106 |
82 |
4/82/106 |
Sherwanis |
10 |
A |
0 |
0 |
none |
| 69 |
67 |
4/67/69 |
T-Shirts |
10 |
A |
0 |
0 |
none |
| 67 |
4 |
4/67 |
Top Wear |
10 |
A |
0 |
0 |
none |
| 68 |
4 |
4/68 |
Bottom Wear |
20 |
A |
0 |
0 |
none |
| 105 |
82 |
4/82/105 |
Kurta Sets |
20 |
A |
0 |
0 |
none |
| 70 |
67 |
4/67/70 |
Shirts |
20 |
A |
0 |
0 |
none |
| 84 |
68 |
4/68/84 |
Trousers |
20 |
A |
0 |
0 |
none |
| 82 |
4 |
4/82 |
Ethnic Wear |
30 |
A |
0 |
0 |
none |
| 107 |
82 |
4/82/107 |
Nehru Jackets |
30 |
A |
0 |
0 |
none |
| 85 |
68 |
4/68/85 |
Shorts |
30 |
A |
0 |
0 |
none |
| 71 |
67 |
4/67/71 |
Sweat Shirts |
30 |
A |
0 |
0 |
none |
| 108 |
82 |
4/82/108 |
Dhotis |
40 |
A |
0 |
0 |
none |
| 72 |
67 |
4/67/72 |
Sweaters |
40 |
A |
0 |
0 |
none |
| 86 |
68 |
4/68/86 |
Track Pants |
40 |
A |
0 |
0 |
none |
| 73 |
67 |
4/67/73 |
Jackets |
50 |
A |
0 |
0 |
none |
| 74 |
67 |
4/67/74 |
Blazers & Coats |
60 |
A |
0 |
0 |
none |
| 75 |
67 |
4/67/75 |
Suits |
70 |
A |
0 |
0 |
none |
| 76 |
67 |
4/67/76 |
Track Suits |
80 |
A |
0 |
0 |
none |
| 77 |
67 |
4/67/77 |
Rain Coats |
90 |
A |
0 |
0 |
none |