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

前端 未结 13 2501
独厮守ぢ
独厮守ぢ 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

    Benchmark it yourself. Write a testbed class that executes a sampled stored procedure a few hundred times, and run the NHibernate code the same amount of times. Compare the average and median execution time of each method.

提交回复
热议问题