Joins and Query Speed

B

Bev

I am attempting to append records to a table. I have a table in my database
that contains a member ID. This single field table has a primary key on the
member id. It contains approximately 5,000 records.

It is joined to a linked table on an AS/400 platform with the same field and
it is also indexed. This table contains millions of records.

When I run the query it has run for days without finishing.
If I run the query with the criteria filled in for select member ids the
query will run. But when joining to the table, it does not finish.

Any suggestions on improving the performance of this query.
 
V

vanderghast

Make 2 queries:


SELECT *
FROM as400table
WHERE memberID = parameter


saved as, say, q1, then


SELECT *
FROM q1 INNER JOIN otherTable
ON q1.memberID=otherTable.memberID


And use that second query.


Vanderghast, Access MVP
 

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

Top