----- Original Message -----
From: "Michael Widenius" <monty@stripped>
To: "Paul Cadach" <paul@stripped>
Sent: Tuesday, August 21, 2001 7:55 PM
Subject: Missed optimization in 3.23.33
> Paul> May be this optimization requres to bring weighting for functions,
> Paul> execute simplest functions first, then (if condition is true) more
> Paul> and last (if condition still true) - most complex functions? This
> Paul> be a value of time which each function executed 10000 (for example)
> The problem is that it's almost impossible for the optimizer to say
> which function will be faster, as this will depend on the arguments
> and the data. When executing expression MySQL does most things from
> left to right, so it's relatively easy for a human to get MySQL to do
> the right thing.
The problem was solved by using of weightings for comparsion functions at
application level when SQL expression builds.