Fwd: [PHP-DB] query optimization
| From: | Bastien Koert | Date: | Mon, 29 Sep 2008 00:16:35 +0000 |
| Subject: | Fwd: [PHP-DB] query optimization | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45493@lists.php.net to get a copy of this message | ||
On Sun, Sep 28, 2008 at 6:28 PM, Chris <dmagick@gmail.com> wrote:
> Yves Sucaet wrote:
>
>> Hi Jack,
>>
>> I'm expecting less than 10 records in the resulting set.
>> The BlockUnit table contains 337,253 records; the InteractionParts table
>> contains 279,953 records.
>>
>> It takes currently 8.3 seconds to execute the query as I have it.
>>
>> Erh, this is embarassing but I'm going to need some help re-writing it
>> with EXISTS...
>>
>> Thanks for the help so far,
>>
>
> You haven't said which parts of the query is slow.
>
> Try:
>
> Just the subselect query.
> If that's slow, try just the first part of the union.
> If that's not slow, try the second part.
>
> At least you'll know where to concentrate.
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
If possible, see if you can have the sort space on the db table made bigger.
You could gain a lot of performance if you can adjust some the of settings
in the mysql control file.
sorry, hit reply instead of reply all (my bad)
--
Bastien
Cat, the other other white meat
--
Bastien
Cat, the other other white meat