Re: PHP performance
| From: | Curt Zirzow | Date: | Tue, 10 Aug 2004 22:07:08 +0000 |
| Subject: | Re: PHP performance | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-193397@lists.php.net to get a copy of this message | ||
* 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.
>
Its hard to say blindly where the bottle-neck is though.
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!