By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,586 Members | 1,877 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,586 IT Pros & Developers. It's quick & easy.

Which is faster in DAO under Access Basic (Access 2.0) FindFirst or Seek?

P: n/a
MLH
I have a table I can open as table type
recordset or a dynaset. Searching for
a particular value in the table's main
keyfield, which would be faster and
less strain on the application...
FindFirst method - or - Seek method?
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Thu, 14 Apr 2005 14:07:27 -0400, MLH <CR**@NorthState.net> wrote:

Take 5 minutes and test it both ways in your environment with your
data structure.
My money is on Seek.
Let us know how you fare.

-Tom.

I have a table I can open as table type
recordset or a dynaset. Searching for
a particular value in the table's main
keyfield, which would be faster and
less strain on the application...
FindFirst method - or - Seek method?


Nov 13 '05 #2

P: n/a
MLH
You were right, Tom. I had to get a table that was NOT attached
to test it on. I got one that had about 160k recs in it. Seek was
quicker. Thx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Take 5 minutes and test it both ways in your environment with your
data structure.
My money is on Seek.
Let us know how you fare.

-Tom.

I have a table I can open as table type
recordset or a dynaset. Searching for
a particular value in the table's main
keyfield, which would be faster and
less strain on the application...
FindFirst method - or - Seek method?


Nov 13 '05 #3

P: n/a
MLH <CR**@NorthState.net> wrote in
news:i5********************************@4ax.com:
I have a table I can open as table type
recordset or a dynaset. Searching for
a particular value in the table's main
keyfield, which would be faster and
less strain on the application...
FindFirst method - or - Seek method?

Take 5 minutes and test it both ways in your environment with your
data structure.
My money is on Seek.
Let us know how you fare.


You were right, Tom. I had to get a table that was NOT attached
to test it on. I got one that had about 160k recs in it. Seek was
quicker. Thx


If you're opening an entire table (which is required for SEEK),
then, yes, SEEK will be faster than .FindFirst on the entire table.

But if you return only the records you are looking for (using
WHERE), you may not even *need* the .FindFirst, and even if you want
to return multiple records and touch each one of them, .FindFirst
navigation within a very small group of records may be faster than a
SEEK because of the added overhead of retrieving more records
required by the SEEK.

SEEK is really only valuable if you have a large table that you
continually need to refer to and you need to jump around in that
table a lot. There are scenarios where this is definitely the case.

But it's limited to recordsets that include only a single table. so
if you have any joins, forget it.

In short, the apparent massive performance advantage of SEEK
disappears in almost all real-world scenarios.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #4

P: n/a
"MLH" wrote
I have a table I can open as table type
recordset or a dynaset. Searching for
a particular value in the table's main
keyfield, which would be faster and
less strain on the application...
FindFirst method - or - Seek method?


Others have given you pros and cons of Seek versus FindFirst.

Let me offer a different suggestion: I usually find the best performance is
from using a Query that only returns the Record (or few Records) of
interest, rather than opening an entire table (to use Seek) or the entire
table as a Dynaset (to use FindFirst). The database engine is very efficient
in this regard, and it is surprising, once you put your mind to it, how many
times you really need only to retrieve one Record (if it exists) or none (if
the particular one does not exist).

Larry Linson
Microsoft Access MVP
Nov 13 '05 #5

P: n/a
MLH
Just read your suggestion. And, its a good one.
Many thx.

xxxxxxxxxxxxxxxxxxxxxxxx

On Fri, 22 Apr 2005 02:54:32 GMT, "Larry Linson"
<bo*****@localhost.not> wrote:
"MLH" wrote
I have a table I can open as table type
recordset or a dynaset. Searching for
a particular value in the table's main
keyfield, which would be faster and
less strain on the application...
FindFirst method - or - Seek method?


Others have given you pros and cons of Seek versus FindFirst.

Let me offer a different suggestion: I usually find the best performance is
from using a Query that only returns the Record (or few Records) of
interest, rather than opening an entire table (to use Seek) or the entire
table as a Dynaset (to use FindFirst). The database engine is very efficient
in this regard, and it is surprising, once you put your mind to it, how many
times you really need only to retrieve one Record (if it exists) or none (if
the particular one does not exist).

Larry Linson
Microsoft Access MVP


Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.