"I intend to live forever - so far, so good." Steven Wright
"I almost had a psychic girlfriend but she left me before we met." Also Steven Wright
"I'm addicted to placebos. I could quit, but it wouldn't matter." Steven Wright yet again.
So then you can do the following
1. Keep the file
2.During the day run the same process/processes on that in a development environment.
3.Profile the applications and turn on tracing every where you can.
4. Analyze the results.
5. Update as needed based on 4 including the possibility of modify the process/processes to provide addition trace data so you can further refine and define future problems.
And run it with wamp localhost . Then I got this error in my browser :
Fatal error: Out of memory (allocated 408944640) (tried to allocate 805306376 bytes) in D:\...\page1.php on line 10
What's problem ? Can anybody says ?
Never attempt to return all records from a table(s) where that table can have a 'large' size where large can range from about 10,000 and on up.
Never do this when the result is for a UI. Just do not allow it. Reason is that no user is going to page through hundreds of pages (multiple items per page) randomly. Rather such a user always knows what they are looking for so require that the user provide more information to narrow the search. This can be designed specifically such that the api (your method) requires paging (page number and page size) and then the method only returns that page.
Additionally the framework or php is providing an implementation of an array which grows to meet the maximum size of data. That is optimized to grow at a rate which is probably doubling every time the previous limit is reached. And you are attempting to put a very large number of records in that array. So at that limit it attempts to double the size of the existing array and fails because there is no more memory in the application. Fix the design rather than attempting to optimize the size yourself (don't return everything.)
As already explained by others the error tells you that you ran out of memory because you have requested to return all data from a huge database.
Your program stops execution when $myArray is full while using already 408 MB of memory. Then the allocation of additional 805 MB failed (the already allocated 408 MB would be freed but that would occur after the content has been copied to the new memory).
You have to limit the number of returned data by using a search term
I need to install Sql server to write some practice C# applications with small Database, is there any version that's free from MS, if there is nothing, which version is low in price and gives minimum stuff to write T Sql, SPs and UDFs?
I am also searching on google not able to find/decide which is free or cheap for just development along with Management Studio, I have installed the SSMS for free but it seems SQL server is expensive any help would be greatly appreciated.
Thanks in advance friends happy Black Friday.
"There is already enough hatred in the world lets spread love, compassion and affection."