CodeIgniter 的 ActiveRecord 资源密集吗? [英] Is CodeIgniter's ActiveRecord resource intensive?
问题描述
我正在编写一个考虑到服务器资源的应用程序,所以我不想使用太多,以便这个应用程序在未来扩展.我不介意写我自己的查询.那么,对于我的应用程序来说,ActiveRecord 资源密集吗?还是没有区别?
I’m coding an application with server resources in mind, so I don’t want to use too much so that this application scales in the future. I don’t mind writing my own queries. So, is ActiveRecord resource intensive for my application? Or does it not make a difference?
谢谢!
推荐答案
CI 的 ActiveRecord基本上不是 ActiveRecord,而是查询生成器.它允许您以面向对象的方式形成简单的查询.与任何抽象一样,从对象状态组装成 SQL 查询比对其进行硬编码要慢,但我怀疑性能影响可以忽略不计.
CI's ActiveRecord is basically not an ActiveRecord, but a Query Builder. It allows you to form simple queries in an object oriented manner. Like with any abstraction, assembling from object state into a SQL query is slower than hardcoding it, but I suspect the performance impact to be negligible.
这篇关于CodeIgniter 的 ActiveRecord 资源密集吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!