Very interesting article, I do have a question or two for clarification and I would also like to add a thing or two (Hope you don't mind).
5. Refrain from using Expressions, such as IIf(), in Queries.
I do understand that using Functions and conditional statements do not process well in an underlying query or even sub queries however if it is in the direct query that is used as a recordset or recordsource would there be much of a time difference or other effect verses using it in the form or report itself?
6. Use Count(*) instead of Count([column]).
Interesting point I thought should be expanded on. :
Quote:
Originally Posted by
• Count(*) counts all rows returned.
• Count([Column Name]) counts all rows where [Column Name] is not NULL.
10. For nontrivial Queries, use saved Queries instead of SQL since they are already optimized.
By this I am sure that you are referring to using Saved Queries versus SQL strings in combo Boxes, Form and Report Recordsources etc.
13. Manually recompile Queries when the size of Tables, or the presence or type of Indexes, has changed.
Just wow (missed this one somewhere along the way) I will be adding a subroutine to do this right away. If all goes well i may post it in the articles section shortly.
Information about query performance in an Access database
For 2000 - 2002 - 2003 A short snippet of the article:
Quote:
After you compact your database, run each query to compile the query so that each query will now have the updated table statistics.
The article also stated that there are many reason to recompile the queries such as adding a number of records etc. a very interesting read.
Found this in a MS Access 97 article for Optimization.
A short snippet of the article:
Quote:
Compile your saved queries before delivering your application. Do this by opening them in datasheet view and immediately closing them. Doing so will save the query plan with the query. This plan tells Jet how to process the query in the most efficient way. If you can, avoid using SQL strings in module code that are constructed and run on the fly. When these are run, they have to be compiled. Also be aware that, over time, the plan saved with the query may become obsolete as the data in the MDB file changes. You may want to recompile queries after compacting your database.