Query time 0.04458
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "1152.18"
},
"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` = 5926) 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.84",
"eval_cost": "3.39",
"prefix_cost": "1152.19",
"data_read_per_join": "154K"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
| 18163 |
18154 |
18154/18163 |
1 hour sessions |
0 |
A |
5926 |
| 18160 |
18154 |
18154/18160 |
15 min sessions |
0 |
A |
5926 |
| 18161 |
18154 |
18154/18161 |
30 min sessions |
0 |
A |
5926 |
| 18162 |
18154 |
18154/18162 |
45 min sessions |
0 |
A |
5926 |
| 18157 |
18155 |
18155/18157 |
Bracelets |
0 |
A |
5926 |
| 18156 |
18155 |
18155/18156 |
Earrings |
0 |
A |
5926 |
| 18158 |
18155 |
18155/18158 |
Necklaces |
0 |
A |
5926 |
| 19644 |
0 |
19644 |
Candles |
1 |
A |
5926 |
| 18340 |
0 |
18340 |
Soap |
2 |
A |
5926 |
| 18155 |
0 |
18155 |
Jewelry |
3 |
A |
5926 |
| 18159 |
0 |
18159 |
Hair Accessories |
4 |
A |
5926 |
| 19271 |
0 |
19271 |
Keychains |
5 |
A |
5926 |
| 18154 |
0 |
18154 |
Distance Reiki |
6 |
A |
5926 |