Yii Find All Out Of Memory

Hi guys,

I’m using Yii’s findAll now and it gets into a memory issue once the table has more than 2~30000 records to return. I think it’s because find all gets all the data at once. Is there a way I can load them one by one ?

Thank you!

If you would like to process all those records, try DAO instead. If it’s only about listing them: Use a CGridView or CListView in conjunction with a CACtiveDataProvider. That way, only the displayed records will actually be loaded from the database.