On Thu, Aug 01, 2002 at 06:15:16PM +0200, Joseph Bueno wrote:
>
> According to MySQL documentation, indexes are not used with OR:
> http://www.mysql.com/doc/M/y/MySQL_indexes.html
> You can't speed up your query by adding indexes.
> Running 2 separate queries is the best you can do if you want to
If running two queries is running faster than perhaps the best way to do
it is select the first query into a temporary table and then insert
select the second to append to the temp table. Then you can select and
sort however you want from the temporary table.
create table tempname SELECT somet
James MacLean wrote:
>On Thu, 1 Aug 2002, Ralf Narozny wrote:
>
>
>
>>Hello!
>>
>>James MacLean wrote:
>>
>>
>>
>>>Hi Folks,
>>>Have only known enough SQL to do what we needed.
>>>Today on mysql-3.23.51 we found out that :
>>>select something from table where index1 = 'value' or index2 = '
On Thu, 1 Aug 2002, Ralf Narozny wrote:
> Hello!
>
> James MacLean wrote:
>
> >Hi Folks,
> >Have only known enough SQL to do what we needed.
> >Today on mysql-3.23.51 we found out that :
> >select something from table where index1 = 'value' or index2 = 'value';
> >Runs considerably slower than
Hello!
James MacLean wrote:
>Hi Folks,
>
>Have only known enough SQL to do what we needed.
>
>Today on mysql-3.23.51 we found out that :
>
>select something from table where index1 = 'value' or index2 = 'value';
>
>Runs considerably slower than:
>
>select something from table where index1 = 'va
Hi Folks,
Have only known enough SQL to do what we needed.
Today on mysql-3.23.51 we found out that :
select something from table where index1 = 'value' or index2 = 'value';
Runs considerably slower than:
select something from table where index1 = 'value';
or
select something from table wher