Query time 0.00104
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "7.08"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "categories",
"access_type": "range",
"possible_keys": [
"c_status",
"id_path",
"index_categories_on_deleted_at"
],
"key": "id_path",
"used_key_parts": [
"id_path"
],
"key_length": "767",
"rows_examined_per_scan": 15,
"rows_produced_per_join": 0,
"filtered": "0.33",
"index_condition": "(`goimagine`.`categories`.`id_path` like '109/%')",
"cost_info": {
"read_cost": "7.00",
"eval_cost": "0.01",
"prefix_cost": "7.01",
"data_read_per_join": "134"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"company_id",
"usergroup_ids",
"status",
"position",
"is_trash",
"deleted_at",
"storefront_id"
],
"attached_condition": "((`goimagine`.`categories`.`company_id` = 0) 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`.`storefront_id` in (0,1)) and (`goimagine`.`categories`.`deleted_at` is null))"
}
},
{
"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": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.02",
"eval_cost": "0.01",
"prefix_cost": "7.03",
"data_read_per_join": "232"
},
"used_columns": [
"category_id",
"lang_code",
"category",
"mega_m_category_banner_url",
"mega_m_category_svg_icon"
]
}
},
{
"table": {
"table_name": "seo_names",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"dispatch"
],
"key": "PRIMARY",
"used_key_parts": [
"object_id",
"type",
"dispatch",
"lang_code"
],
"key_length": "206",
"ref": [
"goimagine.categories.category_id",
"const",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.04",
"eval_cost": "0.01",
"prefix_cost": "7.08",
"data_read_per_join": "86"
},
"used_columns": [
"name",
"object_id",
"company_id",
"type",
"dispatch",
"path",
"lang_code"
]
}
}
]
}
}
}
Result
category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
storefront_id |
seo_name |
seo_path |
mega_m_category_banner_url |
mega_m_category_svg_icon |
112 |
109 |
109/112 |
Spring & Easter |
1 |
A |
0 |
0 |
spring-and-easter |
109 |
|
|
123 |
109 |
109/123 |
Mother's Day |
2 |
A |
0 |
0 |
mothers-day |
109 |
|
|
124 |
109 |
109/124 |
Father's Day |
3 |
A |
0 |
0 |
fathers-day |
109 |
|
|
114 |
109 |
109/114 |
Summer & 4th of July |
4 |
A |
0 |
0 |
summer |
109 |
|
|
118 |
109 |
109/118 |
Christmas |
5 |
A |
0 |
0 |
christmas |
109 |
|
|
113 |
109 |
109/113 |
Holiday & Seasonal Cards |
5 |
A |
0 |
0 |
holiday-and-seasonal-cards |
109 |
|
|
117 |
109 |
109/117 |
Fall & Thanksgiving |
6 |
A |
0 |
0 |
thanksgiving |
109 |
|
|
116 |
109 |
109/116 |
Halloween |
7 |
A |
0 |
0 |
halloween |
109 |
|
|
115 |
109 |
109/115 |
Back to School |
8 |
A |
0 |
0 |
back-to-school |
109 |
|
|
110 |
109 |
109/110 |
Valentine's Day |
10 |
A |
0 |
0 |
valentines-day |
109 |
|
|
111 |
109 |
109/111 |
St. Patricks Day |
100 |
A |
0 |
0 |
st.-patricks-day |
109 |
|
|
119 |
109 |
109/119 |
New Year's Eve |
160 |
A |
0 |
0 |
new-years-eve |
109 |
|
|
121 |
109 |
109/121 |
Hanukkah |
180 |
A |
0 |
0 |
hanukkah |
109 |
|
|