Re: need help on improving performance on this querry
| From: | andy | Date: | Tue, 07 May 2002 18:22:16 +0000 |
| Subject: | Re: need help on improving performance on this querry | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19020@lists.php.net to get a copy of this message | ||
thank you! I did not know this command.
Its 0.16s instead of 1.6!
Andy
<szii@sziisoft.com> schrieb im Newsbeitrag
news:043c01c1f5f2$47f5b3e0$fd02a8c0@surfmetro.com...
> SELECT DISTINCT L.*
> from data.languages L, data2.user U
> WHERE L.id IN (U.language_1, U.language_2, U.language_3)
> order by name;
>
> I believe the IN clause is a shade faster than multiple ORs, but
> I'm not 100% sure.
>
> 'Luck
>
> -Szii
>
> ----- Original Message -----
> From: "andy" <news.letters@gmx.de>
> To: <php-db@lists.php.net>
> Sent: Tuesday, May 07, 2002 9:38 AM
> Subject: [PHP-DB] need help on improving performance on this querry
>
>
> > 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
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>