dtuzjzs3853 2012-10-09 10:44
浏览 59
已采纳

PHP => ORM与高并发的存储过程?

we are building a system that will have very high concurrencies.

For optimization sake, we are thinking about only using Stored Procedures, instead of simplifying our life with an ORM.

Is it a good thing to do?

Is there any ORM out there that are really worth it performance wise, with a very low footprint?

  • 写回答

1条回答 默认 最新

  • donglv9116 2012-10-09 12:40
    关注

    I don't think you'll find a general answer.

    An ORM can be as simple as a few lines of code or as complex as the monstrosity that is Doctrine.

    Performance wise, I'm not sure you'll see much difference between using stored procedures and an ORM whose back-end uses prepared statements. It's probably worth benchmarking to find out.

    However, from a maintainability point of view, Take, for example, the addition of a field in a table. In an ORM this could be as simple as a single file edit. With stored procedures it can mean updating a lot of stored procedures to account for it.

    An ORM gives more flexibility as it doesn't tie all your data to the database and gives you more portability moving forwards. Of course it's weighing these benefits to whether you think they're worthwhile.

    That said, there's nothing to stop an ORM calling stored procedures either.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器