On Mon, 7 Sep 2015 14:00:27 +0100, Tim Ward [email protected] [firebird-support] 
<[email protected]> wrote:
> Please can someone explain to me, again, why
>
>      select Max(MYCOL) from MYTAB
>
> doesn't use the primary key
>

        Because Firebird indexes are unidirectional - it cannot
start from end and move backwards.
        So in the case of ascending index it needs to do full 
table scan. 
        But in the case of descending index it can use the index.

-- 
Virgo Pärna 
[email protected]

Reply via email to