When you know that you are going to do queries that only involve a certain subset of data, you can create a temporary table containing just the rows and columns that you expect to search later. This is created by executing a three or four table join and returning only the needed columns and rows. If you add an index to the temporary table, access to this table is even faster.
Snapshots are a good way to get to this data for ODBC servers, but they cannot be searched with the Seek method because the temporary result that is returned is not indexed. The find methods are unable to use an index for the same reason, and they can be slow if this is a large dynaset. Further WHERE clause refinements to the query still take server time, and if there are a large number of such queries this can be too slow.
One possible solution in this scenario is to do a make-table query to create a "permanent" table in the local database that has its own index, that the time to seek is well worth the time it takes to build. The numbers below show an example of these different approaches with a small table:
This does not scale very well with larger tables that are drawn from SQL Server, but you can always use passthrough to create real SQL Server temporary tables and query against those.
When tried against larger .MDB tables the results are as follows:
For a query that returns 564 records,
Searching for 342 records:
Of course like all the tips given in this paper, you should carefully benchmark any solution to ensure that all the tradeoffs are taken into account.