SQL by its nature will always be SLOWER than a custom created binary search. If you take the time to think about it, each SQL query must be parsed for correctness, then 'interpreted' [size=9px](1)[/size] before accessing the data. The data itself may be fragmented accross multiple disk segments etc and will not be the fastest option for single record type searches.

A binary file using the standard Delphi record structures will always be faster unless it does tooo many disk accesses to find the data.

Code:
Type
  TCardRecord = Record
     CardName : String[30];
     CardText : String[255];
     ....
   End;

Var
  CardFile : File of TCardRecord;
Then ensure the file is stored in sorted order, and do a binary search accross the file. (If you want an example just ask).

Or alternativly include a hash along with the card index into an index file. Hash the card name and then search in the index file to get the card index and access it directly from the Card File.

Lastly - if you want to show off - create the card file and then index the card name along with the card index into a B+ tree structure as an index. This will be fast, possibly faster than the hash table idea but while I've always wanted to make a B+ tree structure I never have.





[size=9px](1) I say interpreted but it could be compiled or similar as well.[/size]