I am retrieving 10K records (having 10 columns with datatypes as datetime
, text
, int
, varchar
) using mysql_fetch_object
and fetching all columns from each joined table in the query , which gave the memory size exhaustion fatal error, but then I amended the query to get only some specific columns which eliminated the error, saving me from drowning in the lake of errors.
The query is simply joining 3 tables, A, B, C as , SELECT * FROM A JOIN B ON ......JOIN C ON ...... WHERE.....
But I am still in the fear that if the no. of records or no. of columns increase, then the error would appear again....so what would be the complete solution of this? I read other posts on SO, and found that mysql_unbuffered_query
should be used. But is there no solution if I use mysql_fetch_object
? Also will unbuffered query take more time as it returns one row at a time?