Re: DB speed
| From: | 1LT John W. Holmes | Date: | Thu, 10 Oct 2002 18:40:32 +0000 |
| Subject: | Re: DB speed | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119563@lists.php.net to get a copy of this message | ||
> >From my experience, I found this:
>
> Selecting 1000 records from 2 tables using a join, 10secs and up.
I'd say you have a problem in your database / table configuration, i.e.
indexes. There's no way a join between two tables that are properly indexed
should take 10 seconds for only 1000 rows.
> Selecting 1000 records for table 1, all records from table 2, then using
php
> to figure out which rows from table 2 belong to table 1 and building my
own
> combined array, less than a second.
You're using a lot more memory on the server, though, by building up a huge
array and recordsets. But, RAM is cheap...
---John Holmes...