 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Tim Guest
|
Posted: Mon Feb 16, 2004 11:14 am Post subject: FindKey v Locate |
|
|
With a TTable, FindKey and Locate would appear to be interchangeable. Is
their use actually different?
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Mon Feb 16, 2004 12:45 pm Post subject: Re: FindKey v Locate |
|
|
It is very difficult to answer database questions when you do not tell
us what database and version you are using.
Assuming Paradox tables, no, they are not the same. FindKey will
always use an index. Locate may not and, therefore, may be very slow
on large datasets.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Tim Guest
|
Posted: Mon Feb 16, 2004 1:11 pm Post subject: Re: FindKey v Locate |
|
|
"Bill Todd (TeamB)" <no (AT) no (DOT) com> wrote
| Quote: | It is very difficult to answer database questions when you do not tell
us what database and version you are using.
|
Sorry. I'm using Paradox tables via BDE v 7.0.
| Quote: | Assuming Paradox tables, no, they are not the same. FindKey will
always use an index. Locate may not and, therefore, may be very slow
on large datasets.
|
OK. If the table has no indexes, then presumably FindKey will generate an
error and Locate is the only option. However, Locate will use an index if it
exists, so assuming both methods are as fast as each other on an indexed
field search, there does not appear to be a down side to using Locate
instead of FindKey, plus it has locate options which FindKey does not have.
Anyway, thanks for the reply.
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Mon Feb 16, 2004 10:24 pm Post subject: Re: FindKey v Locate |
|
|
On Mon, 16 Feb 2004 13:11:29 -0000, "Tim"
<tim (AT) evolvedatasystems (DOT) co.uk> wrote:
| Quote: | Sorry. I'm using Paradox tables via BDE v 7.0.
|
The latest version of the BDE is 5.2.
| Quote: | OK. If the table has no indexes, then presumably FindKey will generate an
error and Locate is the only option. However, Locate will use an index if it
exists, so assuming both methods are as fast as each other on an indexed
field search, there does not appear to be a down side to using Locate
instead of FindKey, plus it has locate options which FindKey does not have.
|
I have seen many cases where an index is available and Located does
not use it.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|