2

Im using multiple locates on a large amount of data, locate does not require an index to function. But would it be faster if I do have one?

Im using delphi.

Michiel T
  • 537
  • 9
  • 23
  • 1
    Possible duplicate http://stackoverflow.com/questions/6981348/fastest-way-to-locate-record-in-tquery-resultset – Jan Doggen Dec 14 '12 at 09:49
  • 2
    Try and see. That all is very depending of virtue of data and the kind index and the implementation of DBMX engine. Also indices slow data modifications - too many indices is not necessarily good. – Arioch 'The Dec 14 '12 at 11:21
  • 1
    What DataSet class are you using? – jachguate Dec 14 '12 at 11:57

1 Answers1

4

Datasets are mostly abstract. It will depend on the underlying implementation what exactly happens when you call the locate method.

That being said, nearly every implementation that I know will use indexes (including DBF ones)

Marco van de Voort
  • 25,628
  • 5
  • 56
  • 89