Query time 0.04148
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "1152.52"
},
"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` = 146) 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": "10.18",
"eval_cost": "3.39",
"prefix_cost": "1152.52",
"data_read_per_join": "154K"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
| 21415 |
0 |
21415 |
All Products |
1 |
A |
146 |
| 528 |
525 |
525/528 |
Rings |
1 |
A |
146 |
| 1416 |
749 |
749/1416 |
Spring |
2 |
A |
146 |
| 15493 |
525 |
525/15493 |
Unisex |
2 |
A |
146 |
| 747 |
0 |
747 |
Bridal |
3 |
A |
146 |
| 529 |
525 |
525/529 |
Earrings |
3 |
A |
146 |
| 531 |
525 |
525/531 |
Bracelets |
4 |
A |
146 |
| 525 |
0 |
525 |
Jewelry |
4 |
A |
146 |
| 1417 |
749 |
749/1417 |
Summer |
4 |
A |
146 |
| 532 |
525 |
525/532 |
Pendants |
5 |
A |
146 |
| 748 |
0 |
748 |
Supplies |
5 |
A |
146 |
| 527 |
0 |
527 |
Accessories |
6 |
A |
146 |
| 530 |
525 |
525/530 |
Necklaces |
6 |
A |
146 |
| 551 |
0 |
551 |
Custom Items |
7 |
A |
146 |
| 533 |
525 |
525/533 |
Jewelry Sets |
7 |
A |
146 |
| 1420 |
525 |
525/1420 |
Chakra Jewelry |
8 |
A |
146 |
| 749 |
0 |
749 |
Holiday/Seasonal |
8 |
A |
146 |
| 1421 |
525 |
525/1421 |
Birthstone Jewelry |
9 |
A |
146 |
| 1412 |
749 |
749/1412 |
Father's Day |
9 |
A |
146 |
| 1411 |
749 |
749/1411 |
Mother's Day |
10 |
A |
146 |
| 13821 |
525 |
525/13821 |
Tree of Life Jewelry |
10 |
A |
146 |
| 21453 |
525 |
525/21453 |
Celestial and Zodiac |
12 |
A |
146 |
| 3637 |
749 |
749/3637 |
Celebrate the USA |
15 |
A |
146 |