Query time 0.00150
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "37.21"
},
"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": 15,
"rows_produced_per_join": 0,
"filtered": "3.33",
"index_condition": "(`portal`.`q_categories`.`category_id` in (2,3,12,95,144,100,6,7,147,152,190,206,301,159,570))",
"cost_info": {
"read_cost": "35.91",
"eval_cost": "0.10",
"prefix_cost": "36.01",
"data_read_per_join": "1K"
},
"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.50",
"eval_cost": "0.10",
"prefix_cost": "36.61",
"data_read_per_join": "1K"
},
"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.50",
"eval_cost": "0.10",
"prefix_cost": "37.21",
"data_read_per_join": "867"
},
"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 |
301 |
0 |
301 |
Products |
0 |
A |
products |
|
none |
7 |
6 |
6/7 |
Bed & Bath |
10 |
A |
bed-and-bath |
6 |
none |
3 |
2 |
2/3 |
Fragrance |
10 |
A |
fragrance |
2 |
none |
2 |
0 |
2 |
Health & Beauty |
10 |
A |
beauty |
|
none |
159 |
6 |
6/159 |
Decor |
20 |
A |
decor |
6 |
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 |
12 |
0 |
12 |
Fashion |
30 |
A |
fashion |
|
none |
190 |
0 |
190 |
Mobiles & Tablets |
40 |
A |
mobiles-tablets |
|
none |
95 |
12 |
12/95 |
Watches |
40 |
A |
watches |
12 |
none |
144 |
2 |
2/144 |
Personal Care |
60 |
A |
personalcare |
2 |
none |
570 |
159 |
6/159/570 |
Home Fragrance |
110 |
A |
home-fragrance |
6/159 |
none |
206 |
190 |
190/206 |
Smart Watches |
150 |
A |
smart-watches |
190 |
none |