Subject Optimizer tricks was Re: Count(id) returns null
Author Ann W. Harrison
> Ann W. Harrison wrote:
>>
>> ... Academic optimizers are full of little tricks ...
>> How much code - and execution time - should we
>>devote that effort?
>>
> Jason Dodson wrote:
> Actually, these "little tricks" are what make some RDBMS's worth using.

Do you have specific examples? The case that started this was
WHERE 1 = 0 - a condition that can be evaluated at compile time as
false. Is it actually worth testing whether both sides of an
equality can be evaluated at compile time and performing the
evaluation?
>
> Maybe a configuration parameter like UseStupidTricks=True/False.

The optimizer is complex enough without adding stupid tricks and tests
for whether they should be used. If you have specific kinds of dumb
queries you think should be handled, lets consider them case by case.

Regards,


Ann