db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Wooldridge <brett.wooldri...@gmail.com>
Subject Re: Badly performing WHERE caluse
Date Thu, 24 Sep 2009 01:34:24 GMT
That'll teach me to post too early in the morning (I'm in Tokyo) and before
coffee.  :-)


On Thu, Sep 24, 2009 at 10:19 AM, Matt Doran <matt.doran@papercut.com>wrote:

> Brett Wooldridge wrote:
>
>> One could argue that in the first case (2>1), the optimizer is free to
>> choose whatever index it wants because the query can provably return no
>> rows.  However, in the second case (1=1), were the DateTimestamp condition
>> must be evaluated, it would appear that the optimizer indeed selected the
>> wrong index.
>>
>>
>>  Ummm, last time I checked, 2 was greater than 1.  :)
>

Mime
View raw message