Performance of recursive stored procedures in MYSQL to get hierarchical data

前端 未结 3 1503
死守一世寂寞
死守一世寂寞 2021-01-16 06:56

I have table employee like,
employee ( emp_id int primary key, emp_name varchar(50), mngr_id int)

and here mngr_id would either null or contain valid emp_id. Th

3条回答
  •  不思量自难忘°
    2021-01-16 07:36

    Tomalak: " ... I would do the recursion in the presentation layer of my app ... "

    This would mean every time the recursion happened another call is sent to the database server from the presentation layer. That would be incredibly slow.

提交回复
热议问题