[AccessD] Curiosity Question - Function in Query versus SQL "Where" Statement in Record Set

Brad Marks BradM at blackforestltd.com
Fri Aug 19 10:54:11 CDT 2011


We have an Access 2007 application that pulls invoice data (for 1
invoice at a time) from a Pervasive database with ODBC.

Originally the key (Invoice Number) to obtain the data for a single
invoice was contained in a Function which was used in the Query's
Criteria.  This worked Okay, but it took about 15 seconds for the query
to run.

Recently, in order to speed things up, I experimented with removing the
Function from the Query and setting up a Record Set with a Where
statement.  This runs in less than 1 second, and the people in our
Accounting Department are very happy with the reduced runtime.

I am curious as to why there is such a large difference in speed.

Thanks,

Brad




More information about the AccessD mailing list