Subject RE: [IBO] IBOTable findkey functionis too slow and reason??
Author
Hello Jason,

Thank you for the reply.  Firstly, yes I'm using a TIBOTable.
I have previously tried creating a descending index on those 3 fields as well, as I read that Firebird indexes are not bidirectional.

However, alternating indexnames to sort based on different columns was eventually causing an error, as described in case #48899 in this Yahoo groups a few days ago. 

We somehow found a way to circumvent this error by applying the following pseudo-code every time we want to sort based on a different column:

 1) de-activate the table
 2) set index name := new_index_desc
 3) set index name := new_index_asc
 4) activate the table

at this point, I was successfully able to apply the following operations in a split second, on a table with 1,400,000 records: first, last, findKey.

But, if I was to omit step 2), then the last operation was yielding incorrect results, likely based on the previously "cached" index?

The problem at this point is, everything I am doing is based on speculations of how IBO should work, and a knowledgeable opinion on the matter would be extremely constructive.

Thanks again for your time,
Khatchig