Subject | Re: [firebird-support] Natural plan still used when index exists |
---|---|
Author | Lucas Franzen |
Post date | 2005-12-28T16:32:59Z |
Ed,
If you ask for MAX () you should have an descending index.
Luc.
> Then I created an index on LastUpdated:Because you created an ascending index.
>
> Create Index TableNameIdx1 on TableName(LastModified);
>
> and when I rerand the select max()... against it, it is still using
> the natural plan:
>
> Plan
> PLAN (TAXYEAR NATURAL)
>
> Adapted Plan
> PLAN (TAXYEAR NATURAL) // Why natural if an index exists?
If you ask for MAX () you should have an descending index.
Luc.