efficiency question

D

deb

Is it more efficient and faster to build a query and use that query in a form
or report
Or
Is it more efficient and faster to enter the SQL into the Record Source of
the form or report??
 
A

Allen Browne

If you type a SQL statement into the RecordSource of a form/report, Access
saves a hidden query anyway. There is therefore no diffference in execution
speed.

So it comes down to what's best for maintaining the database. Do you find it
easier to work with saved queries, where you can re-use the query for other
forms/reports as well? Or do you find it easier to have the SQL statement
associated with the form/report, so it is independent of other changes that
people might make to the database queries?
 
L

Lars Brownie

Allen, Deb,

I have not tested myself but from http://www.fmsinc.com/tpapers/faster/:

"Microsoft Access Form Optimization
Save the SQL of the Form RecordSource as a Query

We've seen situations where a saved query loads significantly faster than
the same SQL string stored as the RecordSource of a form. Somehow, saved
queries are optimized more than the SQL string behind the report."

Lars
 
A

Armen Stein

Allen, Deb,

I have not tested myself but from http://www.fmsinc.com/tpapers/faster/:

"Microsoft Access Form Optimization
Save the SQL of the Form RecordSource as a Query

We've seen situations where a saved query loads significantly faster than
the same SQL string stored as the RecordSource of a form. Somehow, saved
queries are optimized more than the SQL string behind the report."

Lars

We haven't seen a noticable difference, so we use RecordSource SQL all
the time in order to reduce query proliferation.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 
Top