开发者

Why each request with activerecord is doing SHOW TABLE?

开发者 https://www.devze.com 2022-12-27 14:21 出处:网络
My test page is processed if believe to trace in 46 ms, while 11 of them I am doing this 20:53:06.111597 system.db.CDbConnectionOpening DB connection

My test page is processed if believe to trace in 46 ms, while 11 of them I am doing this

 20:53:06.111597 system.db.CDbConnection   Opening DB connection
 20:53:06.118046 system.db.CDbCommand      Querying SQL: SHOW COLUMNS FROM `questions`
 20:53:06.122476 system.db.CDbCom开发者_StackOverflow社区mand      Querying SQL: SHOW CREATE TABLE `questions`

Is this obligatory?


This is true in development mode. Enable cache and set http://www.yiiframework.com/doc/api/CDbConnection#schemaCachingDuration-detail

0

精彩评论

暂无评论...
验证码 换一张
取 消