Query Optimization

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a pretty complicated query that i use in a function called from a
field on a report. Since you can't send record source from a report, i have
to have this query executed for every row (what a wonderful restriction that
is, eh?)

My question is: If you have a where clause restriction on a query, will
Access / MS Jet appropriately tune the query so that it evaluates this where
clause and gets the smaller result set before doing all of the other joins?

Thanks,
-Ben
 
It depends! Sometimes even the order of Where clauses can make a difference.
Is the table indexed on the Where clause?

Do a Google search on Showplan and Access. It can show you how Access
executes a query. Check the results the second time you run it. The first
time doesn't count when tuning queries.
 
Back
Top