Query time 0.04111
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "1155.24"
},
"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` = 7027) 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": "12.90",
"eval_cost": "3.39",
"prefix_cost": "1155.24",
"data_read_per_join": "154K"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
| 16723 |
0 |
16723 |
Accessories |
0 |
A |
7027 |
| 16121 |
0 |
16121 |
Blankets |
0 |
A |
7027 |
| 16129 |
16127 |
16127/16129 |
Cat Nap Pillows |
0 |
A |
7027 |
| 16246 |
0 |
16246 |
Christmas Ornments |
0 |
A |
7027 |
| 16123 |
16124 |
16124/16123 |
Grocery Bags |
0 |
A |
7027 |
| 16724 |
16723 |
16723/16724 |
Hair Bands |
0 |
A |
7027 |
| 16725 |
16723 |
16723/16725 |
Hair Clips |
0 |
A |
7027 |
| 16252 |
16124 |
16124/16252 |
Hanging Towel |
0 |
A |
7027 |
| 16126 |
16124 |
16124/16126 |
Jar Openers |
0 |
A |
7027 |
| 16124 |
0 |
16124 |
Kitchen Items |
0 |
A |
7027 |
| 16250 |
16246 |
16246/16250 |
Mini Coffee Mug Ornament |
0 |
A |
7027 |
| 16249 |
16246 |
16246/16249 |
Mini Glitter Candy Ornament |
0 |
A |
7027 |
| 16247 |
16246 |
16246/16247 |
Paint Pour Ornament |
0 |
A |
7027 |
| 16127 |
0 |
16127 |
Pillows |
0 |
A |
7027 |
| 16125 |
16124 |
16124/16125 |
Potholders |
0 |
A |
7027 |
| 16130 |
0 |
16130 |
Rice Heating/Cooling Pads |
0 |
A |
7027 |
| 16722 |
16723 |
16723/16722 |
Scrunchies |
0 |
A |
7027 |
| 16248 |
16246 |
16246/16248 |
Tassel Cross Ornament |
0 |
A |
7027 |
| 16122 |
16124 |
16124/16122 |
Tea Towels |
0 |
A |
7027 |
| 16128 |
16127 |
16127/16128 |
Throw Pillows |
0 |
A |
7027 |
| 16251 |
16246 |
16246/16251 |
Wooden Tag Ornament |
0 |
A |
7027 |