Subject »Ø¸´£º [firebird-support] Re: About update clause's time.
Author Adam
> > Hmm, using 'where Bfield > Bvalue' means that the primary key
cannot
> > be used in the plan. Possibly a descending index could be used (I
> > don't know how much Arno has improved this bit since 1.0), but
the
> > primary key creates an ascending index, so without the descending
> > index the query has to go natural...
>
> Are you sure Set? Definitely an ascending index does not help for a
> select max query so FB does not use it in that case, but I think it
> does use it for < and > operations (unfortunately I can not test it
at
> this moment). Unless this is new in FB 1.5 and did not exist in 1.x?

OK a quick test in FB 1.5 confirms my suspicion that an ascending
index can be used in a > query. It makes sense if you think about it.

UPDATE EMPLOYEE SET DOB = '1/1/1950' WHERE ID > 500

gives PLAN (EMPLOYEE INDEX (PK_EMPLOYEE))

> Unfortunately I do not
> have access to my work machine at the moment where I have linked a
> good post from Helen on how MGA works.

But I do now ;)

http://groups.yahoo.com/group/firebird-support/message/59165

My previous post contains the sort of information I would be looking
for in tracking this down.

Adam