Query time 0.00213
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "69.45"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "q_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 28,
"rows_produced_per_join": 0,
"filtered": "3.33",
"index_condition": "(`portal`.`q_categories`.`category_id` in (2,10,11,144,100,101,105,113,117,130,131,132,133,134,135,145,248,361,362,523,6,168,529,7,147,584,586,589))",
"cost_info": {
"read_cost": "67.02",
"eval_cost": "0.19",
"prefix_cost": "67.21",
"data_read_per_join": "2K"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"level",
"usergroup_ids",
"status",
"position",
"is_trash",
"ab__lc_catalog_image_control"
],
"attached_condition": "(((`portal`.`q_categories`.`usergroup_ids` = '') or find_in_set(0,`portal`.`q_categories`.`usergroup_ids`) or find_in_set(1,`portal`.`q_categories`.`usergroup_ids`)) and (`portal`.`q_categories`.`status` = 'A') and (`portal`.`q_categories`.`level` <= 3))"
}
},
{
"table": {
"table_name": "q_category_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"lang_code"
],
"key_length": "9",
"ref": [
"portal.q_categories.category_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.93",
"eval_cost": "0.19",
"prefix_cost": "68.33",
"data_read_per_join": "2K"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
},
{
"table": {
"table_name": "q_seo_names",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"dispatch"
],
"key": "PRIMARY",
"used_key_parts": [
"object_id",
"type",
"dispatch",
"lang_code"
],
"key_length": "206",
"ref": [
"portal.q_categories.category_id",
"const",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.93",
"eval_cost": "0.19",
"prefix_cost": "69.45",
"data_read_per_join": "1K"
},
"used_columns": [
"name",
"object_id",
"type",
"dispatch",
"path",
"lang_code"
]
}
}
]
}
}
}
Result
category_id |
parent_id |
id_path |
category |
position |
status |
seo_name |
seo_path |
ab__lc_catalog_image_control |
362 |
361 |
248/361/362 |
Baby Bath |
10 |
A |
baby-bath |
248/361 |
none |
7 |
6 |
6/7 |
Bed & Bath |
10 |
A |
bed-and-bath |
6 |
none |
134 |
10 |
2/10/134 |
Face |
10 |
A |
face |
2/10 |
none |
2 |
0 |
2 |
Health & Beauty |
10 |
A |
beauty |
|
none |
130 |
11 |
2/11/130 |
Shampoo |
10 |
A |
shampoo |
2/11 |
none |
145 |
144 |
2/144/145 |
Shave & Hair Cutting |
10 |
A |
shave-and-hair-cutting |
2/144 |
none |
135 |
10 |
2/10/135 |
Body |
20 |
A |
body |
2/10 |
none |
131 |
11 |
2/11/131 |
Conditioner |
20 |
A |
conditioner |
2/11 |
none |
6 |
0 |
6 |
Home & Decor |
20 |
A |
home-and-decor |
|
none |
100 |
144 |
2/144/100 |
Make-Up |
20 |
A |
make-up |
2/144 |
none |
147 |
7 |
6/7/147 |
Bathroom |
30 |
A |
bathroom |
6/7 |
none |
132 |
11 |
2/11/132 |
Hair coloring products |
30 |
A |
hair-coloring-products |
2/11 |
none |
10 |
2 |
2/10 |
Skin Care |
30 |
A |
skin-care |
2 |
none |
168 |
6 |
6/168 |
Small Appliances |
30 |
A |
small-appliances |
6 |
none |
11 |
2 |
2/11 |
Hair Care |
40 |
A |
hair-care |
2 |
none |
133 |
11 |
2/11/133 |
Hair Treatment Products |
40 |
A |
hair-treatment-products |
2/11 |
none |
523 |
11 |
2/11/523 |
Hair Styling Tools |
50 |
A |
hair-styling-tools |
2/11 |
none |
361 |
248 |
248/361 |
Bath & Baby Care |
60 |
A |
bath-and-baby-care |
248 |
none |
248 |
0 |
248 |
Kids Corner |
60 |
A |
kids-corner |
|
none |
144 |
2 |
2/144 |
Personal Care |
60 |
A |
personalcare |
2 |
none |
589 |
2 |
2/589 |
Food & Beverages |
120 |
A |
f-and-b |
2 |
none |
529 |
168 |
6/168/529 |
Insect Killer |
220 |
A |
insect-killer |
6/168 |
none |