RE: [PHP] CPU usage @5% during 2 minutes
| From: | Janke Dávid | Date: | Tue, 19 Oct 2004 21:48:46 +0000 |
| Subject: | RE: [PHP] CPU usage @5% during 2 minutes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199832@lists.php.net to get a copy of this message | ||
2004-10-19, k keltezéssel 23:38-kor Jennifer Goodie ezt írta:
> -------------- 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?
Yes. And although I don't like mysql I must say, that the query runs
damned fast. 11341 rows in 0.23 seconds.