Is there a corresponding 'AND' version of the 'UNION' ?
... UNION ALL ...
PB
: 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
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
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
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
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