Hi.
IMO, he wanted to know whether MySQL is capable of optimizing the
repeated use of CONCAT(field_1,field_2), i.e. whether MySQL recognizes
that this expression is used several times and only calculates it once.
Bye,
Benjamin.
On Sun, Jul 25, 1999 at 12:59:40PM +0300, sinisa@stripped wrote:
> Vladislav Malyshkin writes:
> >
> > Hi,
> > Does MySQL do the optimization
> > by not calling CONCAT 5 times in the following QUERY,
> > which I use to check for the keywords.
> >
> > SELECT * from table_x WHERE
> > id=34 AND y=67 AND
> > (FIND_IN_SET('word1',CONCAT(field_1,field_2))>0 OR
> > FIND_IN_SET('word2',CONCAT(field_1,field_2))>0 OR
> > FIND_IN_SET('word3',CONCAT(field_1,field_2))>0 OR
> > FIND_IN_SET('word4',CONCAT(field_1,field_2))>0 OR
> > FIND_IN_SET('word5',CONCAT(field_1,field_2))>0)
>
> Hi Vladislav !
>
> How could MySQL do an optimization on your query. It can not optimize
> a query regarding keys nor to figure out a better way of fixing your
> query.
>