JOINS vs nested queries

  • Thread starter Thread starter Josh
  • Start date Start date
J

Josh

When 5 or more tables are involved in a query, is it
better to do several subqueries and use those tables in
the final query?

Thanks for the help.
Josh
 
Josh,

If you can get the results you need by a single query based on the 5
tables, I think this would generally be the way to go. However, there
are a few considerations. First, if you are using Left Joins in your
query, depending on the structure of them, it may be necessary to make
a query first to evaluate this join, and then add this query to the
main query as a second step. Second, if you are doing any domain
functions (Totals) in the query, it may be necessary to combine
subqueries. Third, if your query will result in a large number of
records being returned, and if you are using selection criteria, your
query may be significantly quicker if you apply the selection criteria
to a subquery which is just based on the table with the field(s) to
which the criteria are being applied.

- Steve Schapel, Microsoft Access MVP
 
Back
Top