Full Version: Speed
UtterAccess Discussion Forums > Microsoft® Access > Access Tables + Relationships
azizrasul
In terms of retrieving filtered data, which method is the fastest? Stored queries, domain functions or recordsets?
khaos
Domain Functions are the slowest, a stored query should be the fastest since as a query runs multiple times it becomes optimized and therefore faster.

HTH
Ken
AJS
The Domain functions are notoriously slow.

For any but the simplest queries, I find I get the best performance if I use a saved query and open it as an ADO or DAO recordset.

-AJ
R. Hicks
A well designed query would be my choice althought it may not be a stored query.
I have not seen a noticable difference in a stored query or SQL executed in VBA code.
... although a stored query is supposed to be faster ...

The Domain Aggregate function would be that slowest ...

RDH
azizrasul
When I said stored query, I meant creating a query which is then available in the Queries section. Is there a difference between a stored and saved query? What is meant by a saved query, isn't the same as a stored query?
R. Hicks
A stored query is one created and available in the Query window.
I use more queries that are SQL strings stored in VBA code ... that do no appear in the Query window.

RDH
azizrasul
Thanks guys.
R. Hicks
No problem ... smile.gif

RDH
Bernie
Our system is so slow I finally started doing make table queries on form open.

It's weird. You'd think it'd take no longer to pull data from a server as the row source for a combo box in VB than it would to pull it down and make a table and then pull data from the table you made but, it is MUCH faster to pull it all down.

If I create the rowsource in VB directly from the server it takes over 5 seconds but I can pull it all down in VB and make a table and pull the data from it in less than 2.

Some things just don't make sense.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.