Optimisation of Active record

I am using webgrind on my application to increase response speed of my application. But i am using active record to fetch big amount of data. Though there are many queries and each time it changes according to user, hence i cann’t use cache.





Above function is called 395 time, can anyone suggest a way to optimise the function to increase the speed. I am using Yii 1.1.

Metadata is about schema, not about data. So you can cache it. Check http://www.yiiframework.com/doc/guide/1.1/en/topics.performance#using-caching-techniques

Yes, but my tables are also changing. Please check the attachment. Is there any other way to optimise Active record or Yii as i have tried everything mentioned on the given link.But nothing is giving any substantial result.

If your schema is changing constantly you can’t avoid refreshing info about it.