Skip to content
Advertisement

Speeding Up Access 2016 Query

I have a query that contains amongst other things batsmanIDs and League names (extract below). I have put together another query to return all records where a batsman has played in each of two Leagues.

The query works but it is very, very slow.

There are 48,000 records returned in the first query but when I use that it runs instantly.

Can anyone suggest how to speed the new query up?

Thanks

Query:

Table: enter image description here

Advertisement

Answer

You could accomplish this using inner joins such that the query will return only those records with a batmans appearing in both subqueries:

EDIT: To select batsmen who have only played in the two leagues in question (and no others), you might try:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement