Query time 0.00914
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "7.35"
},
"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",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 3,
"rows_produced_per_join": 0,
"filtered": "2.00",
"index_condition": "((`jmj_test`.`jmj_categories`.`category_id` in (2,45,55)) and (`jmj_test`.`jmj_categories`.`category_id` <> 1) and (`jmj_test`.`jmj_categories`.`category_id` in (3,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,2,36,31,32,33,34,35,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,55,56,57,58,59,46,60,61,62,63,64,65,66,4,67,69,70,71,73,74,75,76,77,68,83,84,85,86,78,79,88,5,89,92,93,94,95,96,90,97,98,99,91,100,101,102,103,82,104,105,106,107,108,80,109,110,111,112,113,114,115,81,116,117,118,119,120,121,122)))",
"cost_info": {
"read_cost": "7.20",
"eval_cost": "0.01",
"prefix_cost": "7.21",
"data_read_per_join": "238"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"company_id",
"usergroup_ids",
"status",
"product_count",
"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`.`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.06",
"eval_cost": "0.01",
"prefix_cost": "7.28",
"data_read_per_join": "204"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
},
{
"table": {
"table_name": "jmj_companies",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"jmj_test.jmj_categories.company_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.06",
"eval_cost": "0.01",
"prefix_cost": "7.35",
"data_read_per_join": "661"
},
"used_columns": [
"company_id",
"company"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
storefront_id |
product_count |
ab__lc_catalog_image_control |
company |
| 45 |
2 |
2/45 |
Top Wear |
20 |
A |
0 |
0 |
0 |
none |
|
| 2 |
0 |
2 |
WOMEN |
20 |
A |
0 |
0 |
0 |
none |
|
| 55 |
45 |
2/45/55 |
Jump Suits |
110 |
A |
0 |
0 |
2 |
none |
|