mysql - 存储过程在实际项目中用的多吗?
ringa_lee
ringa_lee 2017-04-17 16:17:58
0
12
2379

我发现很多教科书,数据库教程视频都涉及到了存储过程,但是我看过很多开源的php项目,里面几乎就没有用到存储过程啊,我看过java项目倒是有部分项目用到过存储过程,这是为什么呢?

已经从业或者开发过大型项目的程序员们你们在实际工作中用到过他吗?

还有就是存储过程里面的逻辑几乎我都可以用程序(java,php)写,为什么还要直接在数据库里面写呢?(换句话说:存储过程的意义是什么?)

ringa_lee
ringa_lee

ringa_lee

reply all(12)
大家讲道理

Let me talk about the next two points: 1. When encountering a large amount of data inserted and updated, it will be faster to use a stored procedure; 2. The program is not as convenient as the stored procedure to control the rollback operation after inserting records into a large amount of data or table, for example, at the same time When inserting into the warehousing, inventory, and outbound tables, if an error occurs in one place, the stored procedures can all be rolled back together.

左手右手慢动作

Many and very important!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template