hi,
i want to load all db entrys.
Model::model()->findAll($criteria)
but when i execute this, my memory will be exhausted.
Is there a possibility to load the entrys one after another?
hi,
i want to load all db entrys.
Model::model()->findAll($criteria)
but when i execute this, my memory will be exhausted.
Is there a possibility to load the entrys one after another?
use LIMIT and for loop might solve the issue
It’s a common “problem” that active record is not so fast if a lot of data is fetched.
Try using DAO.
try to make a model()->count($criteria) to get the number of records than use the loop FOR with ->findbyAttributes($criteria) until the number you got in the count($criteria)