Board index » delphi » Slow FindNearest, GotoNearest, and Locate methods w/ Interbase

Slow FindNearest, GotoNearest, and Locate methods w/ Interbase

Hi,
    I'm trying to use FindNearest to located a partial spelling in a text
field.  As the user types into an edit box, the database keeps looking for
the closest record.  The problem is that I don't think that these methods
are using the index.  I've got the table indexed on the particular field,
and the TTable is opened on that index.  I am pretty sure that it's not
using the index because when I search for 'A' it finds it pretty quickly,
whereas if I search for 'Z' the drive thrashes around for awhile before it
finds it.

I know this seems crazy, any ideas appreciated.  PS - same code works well
w/ Paradox tables...

 

Re:Slow FindNearest, GotoNearest, and Locate methods w/ Interbase


More on this,
    When I try to do the search via native SQL in a query, it is blazingly
fast.  The only problem occurs when I try to use the mentioned functions to
navigate the table...

Quote
Jason Sweitzer wrote in message <6bbovg$8...@forums.borland.com>...
>Hi,
>    I'm trying to use FindNearest to located a partial spelling in a text
>field.  As the user types into an edit box, the database keeps looking for
>the closest record.  The problem is that I don't think that these methods
>are using the index.  I've got the table indexed on the particular field,
>and the TTable is opened on that index.  I am pretty sure that it's not
>using the index because when I search for 'A' it finds it pretty quickly,
>whereas if I search for 'Z' the drive thrashes around for awhile before it
>finds it.

>I know this seems crazy, any ideas appreciated.  PS - same code works well
>w/ Paradox tables...

Other Threads