Query time 0.00512
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "12.70"
},
"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": 28,
"rows_produced_per_join": 0,
"filtered": "0.18",
"cost_info": {
"read_cost": "12.63",
"eval_cost": "0.01",
"prefix_cost": "12.64",
"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` = 3399) 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 (4,46,52,78,79,107,108,109,110,116,117,118,45,183,200,201,100,209,6634,7108,7109,7726,7727,7728,7732,8323,8324,8457)))"
}
},
{
"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": "12.66",
"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": "12.70",
"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 |
| 7728 |
0 |
7728 |
Canvas Wall Art |
0 |
A |
3399 |
0 |
canvas-wall-art |
|
|
|
| 8457 |
0 |
8457 |
Christmas |
0 |
A |
3399 |
0 |
christmas-en-18 |
|
|
|
| 7108 |
0 |
7108 |
Coasters |
0 |
A |
3399 |
0 |
coasters-en-11 |
|
|
|
| 7109 |
0 |
7109 |
Cutting Boards |
0 |
A |
3399 |
0 |
cutting-boards-en-8 |
|
|
|
| 8324 |
0 |
8324 |
Fall |
0 |
A |
3399 |
0 |
fall-en-5 |
|
|
|
| 8323 |
0 |
8323 |
Halloween |
0 |
A |
3399 |
0 |
halloween-en-19 |
|
|
|
| 7726 |
0 |
7726 |
Ornaments |
0 |
A |
3399 |
0 |
ornaments-en-28 |
|
|
|
| 7732 |
0 |
7732 |
Picture Frames |
0 |
A |
3399 |
0 |
picture-frames-en-3 |
|
|
|
| 7727 |
0 |
7727 |
Signs |
0 |
A |
3399 |
0 |
signs-en-8 |
|
|
|