Re: "between" vs. ">= and <="

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Fri, 14 Nov 2008 18:46:13 +0100
Message-ID: <6o5rr5F21i28U1@mid.individual.net>


On 14.11.2008 17:16, sybrandb wrote:
> On 14 nov, 17:10, Robert Klemme <shortcut..._at_googlemail.com> wrote:

>> a client of us requested to replace ">= and <=" with "between" with a
>> TIMESTAMP column. Unfortunately I am still waiting for his
>> justification...  In the meantime I thought I do some researching.
>> Personally I cannot think of any reason why one or the other should be
>> more efficient.

> The request may be sensible.
> In the 'old' days I had

When (i.e. which Oracle version) was that?

> where a=... and date_column>= and date_column<= and c=...
>
> seeing optimized as
> where (a= and date_column>=) and (datum_column<=) and c=
>
> And gone was the index usage!
> Between ... and ... is treated as one construct.

Spooky. Thanks for the hint. I'll do another test with an additional column.

Kind regards

        robert Received on Fri Nov 14 2008 - 11:46:13 CST

Original text of this message