Query time 0.00261
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "13.32"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "q_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"c_status",
"parent",
"id_path",
"p_category_id"
],
"key": "parent",
"used_key_parts": [
"parent_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 11,
"rows_produced_per_join": 0,
"filtered": "0.45",
"cost_info": {
"read_cost": "11.00",
"eval_cost": "0.01",
"prefix_cost": "13.20",
"data_read_per_join": "135"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"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`.`id_path` like '248/%') and (`portal`.`q_categories`.`category_id` in (12,50,77,79,604,91,99,6,159,167,190,200,248,257,264,266,273,276,278,290,302,303,323,329,330,352,361,364,391,392,393,207,469,470,475,544,546,555,598)))"
}
},
{
"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.05",
"eval_cost": "0.01",
"prefix_cost": "13.26",
"data_read_per_join": "155"
},
"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.05",
"eval_cost": "0.01",
"prefix_cost": "13.32",
"data_read_per_join": "86"
},
"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 |
257 |
248 |
248/257 |
Outdoor Play |
20 |
A |
outdoor-play |
248 |
none |
273 |
248 |
248/273 |
Party Time |
30 |
A |
party-time |
248 |
none |
278 |
248 |
248/278 |
Gear |
40 |
A |
gear |
248 |
none |
302 |
248 |
248/302 |
Kids Fashion |
50 |
A |
kids-fashion |
248 |
none |
361 |
248 |
248/361 |
Bath & Baby Care |
60 |
A |
bath-and-baby-care |
248 |
none |
393 |
248 |
248/393 |
Electronics |
70 |
A |
electronics |
248 |
none |
544 |
248 |
248/544 |
School & Stationery |
90 |
A |
school-and-stationery |
248 |
none |
598 |
248 |
248/598 |
Nursery Bedding & Mattresses |
120 |
A |
nursery-bedding-and-mattresses |
248 |
none |