問題描述
在項目規(guī)模、doctor vs zend-db-table速度和性能方面,我什么時候應(yīng)該在Zend項目中使用doctor,什么時候使用zend-db-table?
In terms of project scale, doctrine vs zend-db-table speed and performance, when should I use doctrine inside Zend project, and when zend-db-table?
推薦答案
任何 ORM 框架都能讓您提高開發(fā)效率,而不是運行時效率.Doctrine 在這方面與 Zend_Db_Table 沒有什么不同.
Any ORM framework gives you benefit for development productivity, not runtime efficiency. Doctrine is no different from Zend_Db_Table in this regard.
如果您要在 Doctrine 和 Zend_Db_Table 之間進行選擇,請根據(jù)使編寫代碼更容易或更快的功能進行選擇.
If you are choosing between Doctrine and Zend_Db_Table, choose based on the features that make it easier or faster to write the code.
在一般情況下,沒有 ORM 框架可以自動使數(shù)據(jù)庫查詢更快.如果您需要高性能的數(shù)據(jù)庫查詢,您應(yīng)該學(xué)習(xí)編寫 SQL 查詢代碼,并設(shè)計您的架構(gòu)和索引以支持您需要運行的查詢的性能.
No ORM framework can automatically make database queries faster in the general case. If you need high-performance database queries, you should learn to code SQL queries, and design your schema and indexes to support performance given the queries you need to run.
這篇關(guān)于什么時候應(yīng)該使用doctor ORM,什么時候使用zend-db-table?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!