Query time 0.03846
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` = 63) 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 |
| 1331 |
0 |
1331 |
All |
0 |
A |
63 |
| 838 |
0 |
838 |
Anklets |
0 |
A |
63 |
| 858 |
846 |
846/858 |
Badge Lanyards |
0 |
A |
63 |
| 845 |
0 |
845 |
Bookmarks |
0 |
A |
63 |
| 839 |
0 |
839 |
Bracelets |
0 |
A |
63 |
| 862 |
851 |
851/862 |
Bracelets |
0 |
A |
63 |
| 841 |
0 |
841 |
Christmas Spiders |
0 |
A |
63 |
| 843 |
0 |
843 |
Earrings |
0 |
A |
63 |
| 861 |
839 |
839/861 |
Friendship Bracelets |
0 |
A |
63 |
| 847 |
0 |
847 |
Hair Accessories |
0 |
A |
63 |
| 1324 |
0 |
1324 |
Handmade Supplies |
0 |
A |
63 |
| 860 |
846 |
846/860 |
Keychains |
0 |
A |
63 |
| 846 |
0 |
846 |
Lanyards and Keychains |
0 |
A |
63 |
| 856 |
843 |
843/856 |
Leverback Earrings |
0 |
A |
63 |
| 859 |
846 |
846/859 |
Mask Lanyards |
0 |
A |
63 |
| 851 |
0 |
851 |
Men's Jewelry |
0 |
A |
63 |
| 852 |
840 |
840/852 |
Mens |
0 |
A |
63 |
| 864 |
851 |
851/864 |
Morse Code Bracelets |
0 |
A |
63 |
| 840 |
0 |
840 |
Morse Code Bracelets |
0 |
A |
63 |
| 844 |
0 |
844 |
Necklaces |
0 |
A |
63 |
| 863 |
851 |
851/863 |
Necklaces |
0 |
A |
63 |
| 1323 |
0 |
1323 |
Pendants |
0 |
A |
63 |
| 850 |
843 |
843/850 |
Post Earrings |
0 |
A |
63 |
| 848 |
839 |
839/848 |
Stretch |
0 |
A |
63 |
| 865 |
838 |
838/865 |
Stretch Anklets |
0 |
A |
63 |
| 857 |
843 |
843/857 |
Threaders |
0 |
A |
63 |
| 1337 |
0 |
1337 |
Toe Rings |
0 |
A |
63 |
| 842 |
0 |
842 |
Tree of LIfe Pendants |
0 |
A |
63 |