By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,301 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,301 IT Pros & Developers. It's quick & easy.

run multiple queries in access

P: n/a
Some of my queries take 1 hour to run, can I run other queries in
access while waiting on the first query? If so, how can I do it?

Thanks a lot,

Wei

Sep 14 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

zw****@gmail.com wrote:
Some of my queries take 1 hour to run, can I run other queries in
access while waiting on the first query? If so, how can I do it?

Thanks a lot,

Wei
>From the same front end, you can't. Make multiple front ends and one
backend.

Sep 14 '06 #2

P: n/a
zw****@gmail.com wrote:
Some of my queries take 1 hour to run, can I run other queries in
access while waiting on the first query? If so, how can I do it?

Thanks a lot,

Wei
Can you tell us why a query takes 1 hour to run? Is it due to extremely
large tables?

Some things to speed up a query are indexes. Let's say you have an
Orders table and an Employee table. The employee table's key is EmpID.
The order table has EmpID for the person who took the order. The
EmpID should be indexed.

Also, fields that are commonly filtered (see Where clause) should be
indexed. "Where OrderDate = Date()"...index on OrderDate.

Now, some will disagree with me here, but SubSelects suck wind big time
99% of the time. And I'd almost wager you have a subselect or two in
your query.

I might take a look at your query and see if I could create another
query that you get a list small. Ex:
Select Orders.* From Orders Where OrderDate = Date()
and save that as Query1
Now create a new query. Add Query1 and link to other tables or queries
and save as Query2.

It's possible that other tables you are linking to can also be made into
other queries that produce smaller recordsets. I would study your query
and determine if you can make other parts of the query separate queries
themselves. I've taken queries that take 1/2 - 1 hour to calc down to
seconds using the above concept.

In one of those long ones I created QueryStep1 to create a smaller
subset. Then had a QueryStep2 using QueryStep1 to get a smaller set
then had a QueryStep3 using QueryStep2 and then finally a QueryStep4
using QueryStep3. Going from a long calc to one done in a second or 2
is worth the effort.
Sep 14 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.