Query time 0.03890
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "1154.90"
},
"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` = 6501) 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.56",
"eval_cost": "3.39",
"prefix_cost": "1154.90",
"data_read_per_join": "154K"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
}
]
}
}
}
Result
| category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
| 16898 |
16895 |
15645/16895/16898 |
4th of July |
0 |
A |
6501 |
| 16901 |
15645 |
15645/16901 |
Cat Toys |
0 |
A |
6501 |
| 19243 |
16895 |
15645/16895/19243 |
Christmas |
0 |
A |
6501 |
| 15647 |
15644 |
15644/15647 |
Framed Prints |
0 |
A |
6501 |
| 19244 |
15645 |
15645/19244 |
Gloves & Mittens |
0 |
A |
6501 |
| 15649 |
15645 |
15645/15649 |
Gnomes |
0 |
A |
6501 |
| 16896 |
16895 |
15645/16895/16896 |
Halloween |
0 |
A |
6501 |
| 19241 |
15645 |
15645/19241 |
Hats |
0 |
A |
6501 |
| 16895 |
15645 |
15645/16895 |
Holiday |
0 |
A |
6501 |
| 15646 |
15644 |
15644/15646 |
Metal Prints |
0 |
A |
6501 |
| 15648 |
15644 |
15644/15648 |
Prints |
0 |
A |
6501 |
| 19242 |
15645 |
15645/19242 |
Scarves |
0 |
A |
6501 |
| 16897 |
16895 |
15645/16895/16897 |
Valentine's Day |
0 |
A |
6501 |
| 19240 |
16895 |
15645/16895/19240 |
Winter |
0 |
A |
6501 |
| 19232 |
0 |
19232 |
Shop All |
1 |
A |
6501 |
| 15645 |
0 |
15645 |
Fiber Art |
2 |
A |
6501 |
| 15644 |
0 |
15644 |
Photography |
3 |
A |
6501 |