Why is parameterized SQL generated by NHibernate just as fast as a stored procedure?

前端 未结 13 2553
独厮守ぢ
独厮守ぢ 2020-12-14 20:47

One of my co-workers claims that even though the execution path is cached, there is no way parameterized SQL generated from an ORM is as quick as a stored procedure. Any hel

13条回答
  •  被撕碎了的回忆
    2020-12-14 21:09

    He may be correct for the specific use case he is thinking of. A stored procedure will probably execute faster for some complex set of SQL, that can be arbitrarily tuned. However, something you get from things like hibernate is caching. This may prove much faster for the lifetime of your actual application.

提交回复
热议问题