Query time 0.00713
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "cscart_categories.is_trash, cscart_categories.position, cscart_category_descriptions.category",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "ref",
"possible_keys": ["c_status", "parent", "id_path"],
"key": "parent",
"key_length": "3",
"used_key_parts": ["parent_id"],
"ref": ["const"],
"rowid_filter": {
"range": {
"key": "id_path",
"used_key_parts": ["id_path"]
},
"rows": 9,
"selectivity_pct": 4.591836735
},
"rows": 8,
"filtered": 4.591836929,
"attached_condition": "(cscart_categories.usergroup_ids = '' or find_in_set(0,cscart_categories.usergroup_ids) or find_in_set(1,cscart_categories.usergroup_ids)) and cscart_categories.`status` = 'A' and cscart_categories.id_path like '101/%' and cscart_categories.storefront_id in (0,1) and cscart_categories.category_type = 'C'"
}
},
{
"table": {
"table_name": "cscart_category_descriptions",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["category_id", "lang_code"],
"ref": ["dev_db.cscart_categories.category_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_category_descriptions.lang_code = 'vi')"
}
},
{
"table": {
"table_name": "cscart_seo_names",
"access_type": "ref",
"possible_keys": ["PRIMARY", "dispatch"],
"key": "PRIMARY",
"key_length": "206",
"used_key_parts": ["object_id", "type", "dispatch", "lang_code"],
"ref": [
"dev_db.cscart_categories.category_id",
"const",
"const",
"const"
],
"rows": 130,
"filtered": 100,
"attached_condition": "trigcond(cscart_seo_names.`type` = 'c' and cscart_seo_names.dispatch = '' and cscart_seo_names.lang_code = 'vi')"
}
}
]
}
}
}
}
Result
category_id |
parent_id |
id_path |
category |
position |
status |
company_id |
storefront_id |
svg_icon |
product_spin_ids |
seo_name |
seo_path |
340 |
101 |
101/340 |
Đồ Dùng Nhà Bếp |
0 |
A |
0 |
0 |
|
|
do-dung-nha-bep |
101 |
341 |
101 |
101/341 |
Đồ Dùng Phòng Tắm |
1 |
A |
0 |
0 |
|
|
do-dung-phong-tam-vi |
101 |
163 |
101 |
101/163 |
Đồ Dùng Phòng Ngủ |
2 |
A |
0 |
0 |
|
|
do-dung-phong-ngu |
101 |
165 |
101 |
101/165 |
Đồ Nội Thất |
3 |
A |
0 |
0 |
|
|
do-noi-that |
101 |
313 |
101 |
101/313 |
Đồ Gốm |
4 |
A |
0 |
0 |
|
|
do-gom |
101 |
166 |
101 |
101/166 |
Trang Trí Nhà Cửa |
5 |
A |
0 |
0 |
|
|
trang-tri-nha-cua |
101 |
169 |
101 |
101/169 |
Nến Thơm |
6 |
A |
0 |
0 |
|
|
nen-thom-vi |
101 |
168 |
101 |
101/168 |
Nhang, Trầm |
7 |
A |
0 |
0 |
|
|
nhang |
101 |
171 |
101 |
101/171 |
Sản Phẩm Làm Sạch |
8 |
A |
0 |
0 |
|
|
san-pham-lam-sach |
101 |