Re: Indexed searching with OR ?

2004-02-26 Thread Peter Brawley
Is there a corresponding 'AND' version of the 'UNION' ? ... UNION ALL ... PB

Re: Indexed searching with OR ?

2004-02-20 Thread Matt W
: Re: Indexed searching with OR ? Hi! MySQL's optimizer has a slight problem. OR queries cause it to get very confused. Try the following to get the best performance: Rewrite SELECT FROM table WHERE (condition1) OR (condition2); As: (SELECT FROM table WHERE condition1) UNION (SELECT

Indexed searching with OR ?

2004-02-16 Thread Andreas Pardeike
where; Using index 5) Same thing on two different fields. Say good-bye to indexed searching: mysql explain select wordid from wordlist where wordid in (4000,5000,6000) or artikelnummer = '834534857345'; id 1 select_typeSIMPLE table wordlist type ALL possible_keys

Re: Indexed searching with OR ?

2004-02-16 Thread Chris Nolan
range possible_keys wordid keywordid key_len4 refNULL rows 6 Extra Using where; Using index 5) Same thing on two different fields. Say good-bye to indexed searching: mysql explain select wordid from wordlist where wordid

Re: Indexed searching with OR ?

2004-02-16 Thread Andreas Pardeike
On 2004-02-16, at 14.13, Chris Nolan wrote: MySQL's optimizer has a slight problem. OR queries cause it to get very confused. Try the following to get the best performance: Rewrite SELECT FROM table WHERE (condition1) OR (condition2); As: (SELECT FROM table WHERE condition1) UNION (SELECT FROM

Re: Indexed searching with OR ?

2004-02-16 Thread Chris Nolan
Hello again! Andreas Pardeike wrote: On 2004-02-16, at 14.13, Chris Nolan wrote: MySQL's optimizer has a slight problem. OR queries cause it to get very confused. Try the following to get the best performance: Rewrite SELECT FROM table WHERE (condition1) OR (condition2); As: (SELECT FROM