![]() |
Active record class eating all the memory - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Active record class eating all the memory (/showthread.php?tid=14616) Pages:
1
2
|
Active record class eating all the memory - El Forum - 01-08-2009 [eluser]ixxalnxxi[/eluser] I am continually getting the following error: Fatal error: Out of memory (allocated 47448064) (tried to allocate 50 bytes) How is it allocating 47448064 when trying to allocate 50 bytes? When I comment out the active records portion of the code the error no longer comes up. Any idea as to what is going on or how to fix it? Active record class eating all the memory - El Forum - 01-09-2009 [eluser]Bogdan Tanase[/eluser] Are you retrieving a large amount of data? Try LIMIT-ing your result... Active record class eating all the memory - El Forum - 01-09-2009 [eluser]ixxalnxxi[/eluser] The query pulls, of 15,000 records, one piece of data out. I don't have it limited but I will test that. The reason I think it pulls one out is because it looks for where an id is matched, and the id is unique auto-incrementing so it should be by default only pulling one out. Active record class eating all the memory - El Forum - 01-09-2009 [eluser]Michael Wales[/eluser] Is the ID column indexed / primary key? Active record class eating all the memory - El Forum - 01-11-2009 [eluser]ixxalnxxi[/eluser] Quote:Is the ID column indexed / primary key? that's correct. Active record class eating all the memory - El Forum - 01-12-2009 [eluser]Bogdan Tanase[/eluser] After the last active record instruction, insert Code: echo $this->db->last_query(); And paste here the generated query Active record class eating all the memory - El Forum - 01-12-2009 [eluser]ixxalnxxi[/eluser] !! using 'echo $this->db->last_query(); ', i realized the query was actually SELECT * FROM (`phpbb_users`) WHERE `username` = 0 resulting in about 11k worth of records (hence, the problem) Thanks for the tip Tanase and for the help everyone else ~ Active record class eating all the memory - El Forum - 01-12-2009 [eluser]chandrajatnika[/eluser] why you don't use paggination?? Active record class eating all the memory - El Forum - 01-14-2009 [eluser]ixxalnxxi[/eluser] Pagination isn't necessary, I was only intending to pull out one record but was accidentally pulling out a lot more than I wanted. Active record class eating all the memory - El Forum - 05-28-2014 [eluser]Unknown[/eluser] [quote author="chandrajatnika" date="1231778996"]why you don't use paggination??[/quote] sorry. i'm beginner ![]() how i use paggination? how i save variables for paggination? thx |