Query time 0.00149
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "16.31"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id",
"index_categories_on_deleted_at"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 36,
"rows_produced_per_join": 0,
"filtered": "0.14",
"cost_info": {
"read_cost": "16.24",
"eval_cost": "0.01",
"prefix_cost": "16.24",
"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` = 1901) 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) and (`goimagine`.`categories`.`category_id` in (3,14,4,46,52,109,178,195,196,197,208,228,231,367,368,370,375,379,2566,7492,3548,2873,8601,2874,2881,2885,3098,3532,22740,7651,8600,11208,11209,11210,13366,15528)))"
}
},
{
"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.01",
"eval_cost": "0.01",
"prefix_cost": "16.26",
"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": "16.31",
"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 |
| 15528 |
0 |
15528 |
Americana |
0 |
A |
1901 |
0 |
americana-en |
|
|
|
| 8600 |
8601 |
8601/8600 |
beverage gift sets |
0 |
A |
1901 |
0 |
beverage-gift-sets |
8601 |
|
|
| 11210 |
2885 |
2885/11210 |
Dog Walkers Tote |
0 |
A |
1901 |
0 |
dog-walkers-tote |
2885 |
|
|
| 13366 |
0 |
13366 |
Bee Kind Collection |
1 |
A |
1901 |
0 |
bee-kind-collection |
|
|
|
| 2873 |
7492 |
7492/3548/7492/2873 |
Dog Poop Bag Holders |
1 |
A |
1901 |
0 |
dog-poop-bag-holders |
7492/3548/7492 |
|
|
| 3548 |
7492 |
7492/3548/7492/3548 |
Training Treat Pouch |
2 |
A |
1901 |
0 |
treat-bag |
7492/3548/7492 |
|
|
| 11209 |
0 |
11209 |
Training Treat Pouch |
2 |
A |
1901 |
0 |
training-treat-pouch |
|
|
|
| 2885 |
0 |
2885 |
Walking or Hiking Bags |
3 |
A |
1901 |
0 |
gifts-for-walking-enthusiasts |
|
|
|
| 11208 |
0 |
11208 |
Dog Poop Bag Holders |
4 |
A |
1901 |
0 |
dog-poop-bag-holders |
|
|
|
| 2874 |
8601 |
8601/2874 |
Beverage Sleeves |
5 |
A |
1901 |
0 |
beverage-sleeves |
8601 |
|
|
| 8601 |
0 |
8601 |
Drinkware Accessories |
5 |
A |
1901 |
0 |
drinkware-accessories |
|
|
|
| 3098 |
2885 |
2885/3098 |
Cross Body Shoulder Bags |
6 |
A |
1901 |
0 |
h2o2go-water-bottle-bag |
2885 |
|
|
| 2881 |
0 |
2881 |
Pet Lover Gift |
6 |
A |
1901 |
0 |
pet-lover-gift |
|
|
|
| 3532 |
2885 |
2885/3532 |
Fanny Packs/ Waist Pack |
9 |
A |
1901 |
0 |
fanny-packs |
2885 |
|
|