Hi all,
When i run profiling on my website, i can see that Yii perfoms 4 SQL quries, 2 x SHOW COLUMNS FROM and 2 x SHOW CREATE TABLE.
Why does it this, and how can i disable it to minimize execution time?
I thought that some files might not had write access, in order to store this information, but which files needs this?
samdark
(Alexander Makarov)
2
It’s for active record functionality. For production you can turn on schema caching via following connection setting:
http://www.yiiframework.com/doc/api/1.0.10/CDbConnection#schemaCachingDuration-detail
Okay, i did: ‘schemaCachingDuration’ => 3600 but i see no changes 
bsander
(Sanderb)
4
I think you have to specify a Caching method in your config too.
Adding this worked for me:
'db'=>array(
'connectionString'=>'sqlite:protected/data/db.sqlite3',
'schemaCachingDuration'=>3600,
),
'cache'=>array(
'class' => 'CFileCache',
),
See http://www.yiiframework.com/doc/guide/caching.overview for more info on the various caching classes.
Worked perfectly, thanks!