RE: [PHP] PHP performance [solution]
| From: | Ed Lazor | Date: | Tue, 10 Aug 2004 22:15:04 +0000 |
| Subject: | RE: [PHP] PHP performance [solution] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-193404@lists.php.net to get a copy of this message | ||
I added more indexes. The 20 minute report just took 40 seconds *grin*
Thanks Everyone,
Ed
> -----Original Message-----
> From: Curt Zirzow [mailto:php-general@zirzow.dyndns.org]
> Sent: Tuesday, August 10, 2004 3:07 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] PHP performance
>
> * Thus wrote Ed Lazor:
> > Any recommendations on how to make PHP run faster?
>
> To help figure out which queries are running slow there is the
> php.ini setting:
>
> mysql.trace_mode=On
>
> Using this will have the php library analyze your queries and if
> any of them do table scans php will issue a warning about it, which
> can be very helpful finding out where you need indexes.
>
> >
> >
> >
> > I have a script pulling a lot of data from MySQL and generating reports
> and
> > spitting out data (flush) as it's processing so I can see what's going
> on.
> > It was taking around 10 seconds to process each order. I reduced the
> total
> > number of orders being processed. I expected the script to take less
> time
> > because there were fewer orders to process, but I was surprised to
> discover
> > that time spent processing each order also reduced almost in half. I
> > figured PHP's memory limit per script at 8mb might be the bottleneck, so
> I
> > upped it to 128, restarted apache, and reran the script. Increasing
> > available memory had no effect.
> >