I am doing something similar, but with redbrick and not with sql server. These are my observations:
Using pass through query is slightly different from performance. However, the output will be read-only, which may or may not be what you want.
Using the access request constructor in a separate table with a composite primary key, it can be lightning fast or terribly slow. If the query does not return any rows, you will immediately receive an empty result set. However, if the request returns data, it will be a different story.
This example uses a table called clinic_fact with the primary key registration_number and clinic_position. It has about 6.5 million entries. If you query the database directly by filtering a single registration number, you get instant results. Access requires more than 10 seconds to get results. During this time, I see which sql is being created. It looks like this.
select yourfields from "clinic_fact" where "registration_number" = 'something' and "clinic_position" = 2 or "registration_number" = 'something' and "clinic_position" = 1 or "registration_number" = 'something' and "clinic_position" = 1 or "registration_number" = 'something' and "clinic_position" = 1 or "registration_number" = 'something' and "clinic_position" = 1 or "registration_number" = 'something' and "clinic_position" = 1 or "registration_number" = 'something' and "clinic_position" = 1 or "registration_number" = 'something' and "clinic_position" = 1 or "registration_number" = 'something' and "clinic_position" = 1 or "registration_number" = 'something' and "clinic_position" = 1;
This query returns 2 rows. Clinic positions are 1 and 2.
Such things may or may not happen with SQL Server. I suggest you try and see.
source share