Subject Re: [IBO] Why fetch all the records
Author Nando Dessena
Rohit,

> Last is teh problme in osme of them then. I suspect that the real culprit
> is that the ibotable translates the indexname supplied to fields and the
> select statement uses the fields rather than the index.

there isn't possibly any other thing to do in a select statement than
using the real field names. Both TTable and TIBOTable work the same way
in this regard.
It is ironic to say that in this very special case the BDE is smarter
than IBO: when it processes your Last operation, it will reverse the
ORDER BY from the original select statement, and start fetching
backwards (with the additional overhead of keeping two open cursors, but
one who uses TTable usually doesn't mind).

As Jason said, wait for IBO v4 and TIBOTable will catch up with this BDE
behaviour and/or possibly something even smarter.

> I will have to
> inspect the monitor logs and play with the plan some more :-)

I don't think you will get any benefit from that; better spend you time
removing the Last statements from the code! ;-)

WRT the wise words Jason and Helen told about how not to write a C/S
application this way, I couldn't agree more. The fact that the BDE
allows you to get away with TTables more smoothly still applies, though.
Ciao
--
____
_/\/ando