Solved

ms access and sql server

Posted on 2016-07-15
5
40 Views
Last Modified: 2016-07-16
Hi Folks,
I just need a very brief general response to the following.
When using linked (ODBC) SQL Server tables on an Access 2010 FE:
Does running an Access query usually bring all the data to the FE and then subset?
(as opposed to a stored procedure with parameters which sub-sets records on the server?)
i.e will stored-procedures on big datasets always outperform Access queries?
and is there a way of using Access on SQL Server to get better performance without stored-procedures? (pass-through queries?)

thanks in advance
0
Comment
Question by:COACHMAN99
5 Comments
 
LVL 16

Assisted Solution

by:Brian Pringle
Brian Pringle earned 250 total points
ID: 41713229
If you want better performance in Access, I would create views on the SQL server and then query against the view instead of the tables directly.
0
 
LVL 7

Author Comment

by:COACHMAN99
ID: 41713242
Does the view work better because it subsets/joins the data prior to querying it?
i.e. would the view help if there was only one table?
and
Does running an Access query usually bring all the data to the FE and then subset?
 (as opposed to a stored procedure with parameters which sub-sets records on the server?)
thanks
0
 
LVL 26

Accepted Solution

by:
Nick67 earned 250 total points
ID: 41713264
very brief general response
How brief <grin>
Does running an Access query usually bring all the data to the FE and then subset?
Depends on what evil you have done in the query (functions, memo fields, Access specific stuff)
i.e will stored-procedures on big datasets always outperform Access queries?
A stored procedure will never perform worse than an Access query unless you build a bad stored procedure.
and is there a way of using Access on SQL Server to get better performance without stored-procedures?
All sorts of ways: Views, Indexed Views.  A stored procedure isn't the only thing SQL Server has to offer.  A query that you would normally store in Access can be done as a View in SQL Server.  If you index that View, it is persisted and can improve ALL queries involving some or all of its data for ALL clients requesting the data.  A sproc isn't the only game in town.
1
 
LVL 7

Author Closing Comment

by:COACHMAN99
ID: 41713521
Thanks guys.
0
 
LVL 57
ID: 41714541
<<Does running an Access query usually bring all the data to the FE and then subset?>>

 The answer is "it depends".   Just to add a comment or two:

1. An explicit pass-through will always run server side.

2. JET/ACE will always try to send a SQL statement to the BE RDBMS if possible.   But as Nick pointed out, doing "Access" type things, such as using VBA expressions, JET Specific SQL, or performing joins on local tables will force execution "client" side (where MSACCESS.EXE is running).

3. Even with that, JET will try and optimize as much as possible using indexes and sorts.  Working with the data is done where MSACCESS.EXE is running, but it may not pull all the data from the BE in order to get the job done.

Jim.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question