Query time 0.04012
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "1151.51"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "categories",
"access_type": "ref",
"possible_keys": [
"c_status",
"index_categories_on_deleted_at"
],
"key": "index_categories_on_deleted_at",
"used_key_parts": [
"deleted_at"
],
"key_length": "6",
"ref": [
"const"
],
"rows_examined_per_scan": 10182,
"rows_produced_per_join": 33,
"filtered": "0.33",
"index_condition": "(`goimagine`.`categories`.`deleted_at` is null)",
"cost_info": {
"read_cost": "120.75",
"eval_cost": "3.39",
"prefix_cost": "1138.95",
"data_read_per_join": "88K"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"level",
"company_id",
"usergroup_ids",
"status",
"position",
"is_trash",
"deleted_at"
],
"attached_condition": "((`goimagine`.`categories`.`company_id` = 138) and ((`goimagine`.`categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`goimagine`.`categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`goimagine`.`categories`.`usergroup_ids`))) and (`goimagine`.`categories`.`status` = 'A') and (`goimagine`.`categories`.`level` <= 3))"
}
},
{
"table": {
"table_name": "category_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"lang_code"
],
"key_length": "9",
"ref": [
"goimagine.categories.category_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 33,
"filtered": "100.00",
"cost_info": {
"read_cost": "9.16",
"eval_cost": "3.39",
"prefix_cost": "1151.51",
"data_read_per_join": "154K"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
| 544 |
0 |
544 |
Clothing |
0 |
A |
138 |
| 543 |
0 |
543 |
Accessories |
0 |
A |
138 |
| 1812 |
0 |
1812 |
All Products |
0 |
A |
138 |
| 552 |
543 |
543/552 |
Bags |
0 |
A |
138 |
| 563 |
545 |
545/563 |
Bath |
0 |
A |
138 |
| 561 |
545 |
545/561 |
Blankets |
0 |
A |
138 |
| 8285 |
8282 |
8282/8285 |
Clothing |
0 |
A |
138 |
| 1813 |
0 |
1813 |
Custom Order |
0 |
A |
138 |
| 565 |
545 |
545/565 |
Decor |
0 |
A |
138 |
| 553 |
543 |
543/553 |
Feet / Legs |
0 |
A |
138 |
| 8662 |
0 |
8662 |
Gifts Under $20 |
0 |
A |
138 |
| 554 |
543 |
543/554 |
Gloves / Mitts |
0 |
A |
138 |
| 555 |
543 |
543/555 |
Hats |
0 |
A |
138 |
| 8284 |
8282 |
8282/8284 |
Hats/Gloves/Scarves |
0 |
A |
138 |
| 557 |
543 |
543/557 |
Headbands |
0 |
A |
138 |
| 547 |
0 |
547 |
Holiday |
0 |
A |
138 |
| 545 |
0 |
545 |
Home |
0 |
A |
138 |
| 8282 |
0 |
8282 |
Kids |
0 |
A |
138 |
| 566 |
545 |
545/566 |
Kitchen |
0 |
A |
138 |
| 13340 |
545 |
545/13340 |
Outdoor |
0 |
A |
138 |
| 8279 |
1812 |
1812/8279 |
Pets |
0 |
A |
138 |
| 8281 |
0 |
8281 |
Pets |
0 |
A |
138 |
| 558 |
543 |
543/558 |
Scarves |
0 |
A |
138 |
| 559 |
544 |
544/559 |
Shawls / Wraps |
0 |
A |
138 |
| 550 |
544 |
544/550 |
Sweaters |
0 |
A |
138 |
| 548 |
0 |
548 |
Toys / Novelties |
0 |
A |
138 |