need help on improving performance on this querry
| From: | andy | Date: | Tue, 07 May 2002 16:38:26 +0000 |
| Subject: | need help on improving performance on this querry | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19018@lists.php.net to get a copy of this message | ||
Hi there,
I do have a user table with 3 languages. I know that I should have put them
into a seperate table. I still could, but would take lots of recoding. I
discovered, that as soon as I leave out the OR statements the querry takes
under 0.2 s. With the two OR it takes on a 10000 records about 1.4 s.
Is there a way to increase the performance with a different querry? I did
already index the fields, but does not look much better though.
SELECT DISTINCT L.*
from data.languages L, data2.user U
where
L.id = U.language_1
or L.id = U.language_2
or L.id = U.language_3
order by name
Thanx for any help,
Andy