TOP Query - Slow Performance

G

Guest

I have a table with ~15k records of sales.

I'm grouping by Customer and by ProductID and using subqueries to show the
top 5 products by a Sales$ field. Finally I'm using a union query to sum up
the remaining product sales into an "Other" line. The whole data set is
sorted descening, by customer group, then by products.

I have all the neccesary queries to do this and have produced the results.
The issue is that it takes 4 hours on a top of the line PC! Literally!

Wondering if there are ways to improve the speed, if the SQL is being
limited by Access in this case, and/or if there are other solutions (like
Crystal) perhaps that could organize me data in this fashion at all.

The end goal is producing reports with this data layout.

Thanks
SEdison
 
G

Guest

There's only one practical way for us to know: Show us the SQL. Open the
query in design view. Next go to View, SQL View and copy and past it here.
Information on primary keys and relationships would be a nice touch too.
 
D

David F Cox

Show us the queries. It is probably the queries, but maybe and index or two
will help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top