Query time 0.04039
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "1153.54"
},
"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` = 6358) 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": "11.20",
"eval_cost": "3.39",
"prefix_cost": "1153.54",
"data_read_per_join": "154K"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
| 23119 |
0 |
23119 |
|
0 |
A |
6358 |
| 23020 |
0 |
23020 |
Americana |
0 |
A |
6358 |
| 23015 |
0 |
23015 |
Bowl Fillers |
0 |
A |
6358 |
| 23120 |
0 |
23120 |
Candle Mat |
0 |
A |
6358 |
| 23018 |
0 |
23018 |
Christmas |
0 |
A |
6358 |
| 23116 |
0 |
23116 |
crows |
0 |
A |
6358 |
| 23022 |
0 |
23022 |
Easter |
0 |
A |
6358 |
| 23017 |
0 |
23017 |
Fall |
0 |
A |
6358 |
| 23025 |
0 |
23025 |
Fruit |
0 |
A |
6358 |
| 23016 |
0 |
23016 |
Halloween |
0 |
A |
6358 |
| 23057 |
0 |
23057 |
Home Decor |
0 |
A |
6358 |
| 23023 |
0 |
23023 |
Ornaments |
0 |
A |
6358 |
| 23067 |
0 |
23067 |
Pin Keep |
0 |
A |
6358 |
| 23203 |
0 |
23203 |
Pokes |
0 |
A |
6358 |
| 23024 |
0 |
23024 |
Primitive Decor |
0 |
A |
6358 |
| 23076 |
0 |
23076 |
punch needle |
0 |
A |
6358 |
| 23077 |
0 |
23077 |
shelf sitter |
0 |
A |
6358 |
| 23118 |
0 |
23118 |
Table Mat |
0 |
A |
6358 |
| 23111 |
0 |
23111 |
thanksgiving |
0 |
A |
6358 |
| 23021 |
0 |
23021 |
Wall Decor |
0 |
A |
6358 |
| 23019 |
0 |
23019 |
Winter |
0 |
A |
6358 |