If I use Access to link to the SQL Server database, will the speed be the same?
For example, I have a table [TEST]
in the SQL Server database, with an index on column [ID]
. If I write the SQL query in the SQL Server environment:
SELECT ....
FROM TEST
WHERE ID = ...;
The index is working (or helping). If I link to this [TEST]
using Access, and write the query in Access:
SELECT ....
FROM TEST
WHERE ID = ...;
Will the speed the same as querying data in the SQL Server environment? Is there some way to test it, like the execution plan, or SQL Server Profiler in the SQL Server?
Thanks
As long as you are doing all of your joins and where clauses on indexed fields, it should be relatively similar server-side. Problems start to arise when you are using the Access query engine to pull data from linked tables and you are using non-indexed fields.
In these cases, Access likes to do things like request everything from the table, and perform its filters client-side. This hits the server harder, hits the network harder, and forces your machine to chug through a lot more data to display the result set.
Pass-through queries are definitely your best bet to avoid those sorts of problems. A few warnings for using pass-through queries with DAO:
(If I'm working in code, I generally prefer to use ADO for pass-through queries, mostly because it lets me use parameters, and I'm super paranoid about dynamic SQL (especially if there's string input involved). The downside is that ADO doesn't handle JET environments as well as DAO does.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With