[Techtalk] PHP / MySql and fat queries

kproot at nerim.net kproot at nerim.net
Tue Feb 8 19:09:39 EST 2005

Conor Daly wrote:
> There is a 'limit <number>' mysql keyword which should limit the number of
> returned rows.  I saw it being used by phpMyAdmin and know no more about
> It may reduce the time taken to return.  There are also timeout values
> can be set in /etc/php.ini such as 'max_execution_time' which might be
> affecting your output.  If you turn on display of errors in /etc/php.ini
> might get something more informative back.  Note it is considered poor
> security practice to leave error display on since it informs the user of
> your server layout so you should turn it off once the problem is solved.


   The LIMIT keyword would indeed have reduced the number of rows, but I
realised I shouldn't have asked about that as I wanted the query to
return a complete answer.

   I was very nervous about turning error display on, but I did it this
morning before anyone showed up in Apache logs. And here it was,
"maximum execution time of 30 seconds exceeded". Yay! you were right, I
only had to change the 'max_execution_time' value to solve this. I wish
the app wasn't so poorly designed and I was given time to make it
better... anyway.

   My beloved penguin also suggested I could turn error on based on IP or
app login, and I think I will take the time to add this so I will feel
less nervous when next problem arise :)

   Many thanks

More information about the Techtalk mailing list