473,326 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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

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
5 5810
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
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: MLH | last post by:
Is the following remotely correct? =DDE("C:\Program Files\Program Files\Outlook Express\OEmig50","Attachment","Name") I'm not sure that OEmig50.exe is the executable for OE. Anybody know? ...
2
by: jj | last post by:
I have one access database on the desktop and another access database on a remote web server. Is there any way to setup an ODBC link between the two? I've tried adding IP addresses and even...
4
by: Paul Merrion | last post by:
I recently became registrar for a girls' softball league and will be inheriting the previous registrar's Access database of team and player information. I have Office XP for Students and Teachers,...
13
by: Krzysztof Bartosiewicz | last post by:
Hi! I have a problem with an access database. The database which I designed and made using MS access works perfectly OK on my computer however it is not working at all on computers for which it...
1
by: ABC | last post by:
I want to check the user roles for allow/deny access each pages. I know it is possible to add check code on each page. But is very spent time. Is there any configuration (web config) parameters...
2
by: GinnyP | last post by:
Hi, I am new to access basic coding. I would like to select fields from a table based on specific critera. I tried using query but because I am retrieving data from a very large DB2 table it time...
7
by: =?Utf-8?B?a21jY29za2V5?= | last post by:
I'm trying to access an access database on the file server from a web server using asp.net and IIS 6.0. I can do it when I have anonymous access enabled in IIS 6.0 as in the public internet web...
0
by: DrewYK | last post by:
I have the project that may never end in front of me. I am creating a routine that will take SpreadSheets from Excel and bring them into Access. I am not using any "DoCmd"s because the goal...
1
by: chandurp | last post by:
Is there any attribute which indicate the last access date/time a user accessed DB2?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.