RE: [PHP] CPU usage @5% during 2 minutes
| From: | (Jennifer Goodie) | Date: | Tue, 19 Oct 2004 21:38:12 +0000 |
| Subject: | RE: [PHP] CPU usage @5% during 2 minutes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-199830@lists.php.net to get a copy of this message | ||
-------------- Original message from Janke Dávid : --------------
> The sample code (in seperate, this piece of code runs with normal speed,
> but it is this part which runs slowly when executed as a whole,
> everything else is fast):
>
>
> $sqlquery = "SELECT sh_Number, sh_Status FROM service_sheet ORDER BY
> sh_Number DESC";
> $result = mysql_query($sqlquery)
> or die (mysql_error()."
Are you sure it is not the query that is running slow? Have you looked to see what mysql is doing
when the application hangs? What processes does top show as running and using resources? Has the
mysql config recently changed? What does an explain on that query show?