473,387 Members | 1,295 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Access Runs SQL Server Slower

Hello,

A curiosity, why would SQL statements execute faster on SQL Server 2000 through the Enterprise Manager than when sent to the server via ADODB command in Access?

I am developing and testing the code on a stand-alone install of SQL Server 2005 Express, and the live version is on SQL Server 2000 (ver. 8.00.760 (SP3)). No idea if that's an enterprise edition or other, it's definitely not an Express version though.

I used to call Stored Procedures on the server, until I found out about the optimization whereby all SQL statements benefit from caching, at which point I decided to go back to dynamically building SQL statements and calling them directly through the connection (which I prefer).

I tested the performance of the system using both approaches on my SQL Server 2005 installation, and found them to be equal in terms of performance.

However, when I rolled it across to 2000, I've noticed that it seems to run significantly slower. I was surprised, as I knew the old stored procedures used to run just as quick on the server as on 2005. And the 2005 install is Express! With only one core and 1Gb RAM, it outperformed a full install on a dual-core machine with 3Gb RAM. :-?

I tried running a statement through ADODB, and it timed out after 20 minutes. I then tried running the exact same statement through the Enterprise manager, and it finished in just over 5 minutes.

According to BOL, the optimization was added from version 7 onwards, so SQL Server 2000 should be doing the same. Have I missed something?

Regards,
Rob.
May 28 '08 #1
7 1545
NeoPa
32,556 Expert Mod 16PB
This seems like a question for the SQL Server team Rob.

Let me know if you'd like me to move it across for you.
May 29 '08 #2
This seems like a question for the SQL Server team Rob.

Let me know if you'd like me to move it across for you.
Sure, thanks. I posted here as in the past anything even remotely about Access has been asked to go here rather than SQL area.

Thanks,
Rob.
Jun 1 '08 #3
NeoPa
32,556 Expert Mod 16PB
Cross-platform is always a little tricky. In my view though, this belongs in SQL Server rather than Access. We'll see if they can help.
Jun 2 '08 #4
ck9663
2,878 Expert 2GB
Tricky, indeed :)

It depends on a lot of things. Your connection that you used to bridge Access and SQL Server, the connection of the machines and if the sys ad tried limit bandwidth that one can use outside of the Management Studio.

-- CK
Jun 2 '08 #5
Tricky, indeed :)

It depends on a lot of things. Your connection that you used to bridge Access and SQL Server, the connection of the machines and if the sys ad tried limit bandwidth that one can use outside of the Management Studio.

-- CK
I've checked with the sys admins, there are no bandwidth limits on my account (as it has most admin rights).

I know that this machine can do this quickly when I was using the Stored Procedures, so let's focus on the connection bridging Access and SQL Server.

I wondered if there are any settings in ADODB that might be on/off by default in Enterprise Manager that I need to explicitly switch on/off when running from Access?

Cheers.
Jun 3 '08 #6
Well, I finally hit upon the right combination of keywords in Google to find the answers.

The answer is the SET ARITHABORT ON/OFF statement.

Apparently, when you turn ANSI_WARNINGS on, it implicitly turns this option on too. However, ARITHABORT is not on by default for all connections in SQL Server 2000.

It is on by default in 2005, which is why my ADO code runs faster on the 2005 server.

It does get switched on by the various Management Studio programs for SQL Server, which is why any query run through these was faster than ADO.

ANSI_WARNINGS was being turned on in my stored procedures as a compile option cropped up if I did not have it in there, hence my stored procedures on SQL Server 2000 were not slow.

I haven't done any extensive testing yet, but for my standalone SQL statements through ADODB, this option is apparently what is missing.
Jun 3 '08 #7
NeoPa
32,556 Expert Mod 16PB
Thanks for posting the solution. It seems like an obscure one, so well done for finding out about it too :)
Jun 4 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: John | last post by:
Hi, I've recently upgraded from Access 97 to Access 2002 & the performance basically stinks. I have tried the following items listed below but it has only had a minor impact: 1) Upgraded Jet...
3
by: jmev7 | last post by:
I am working on converting an Access 97 app to Access 2003. It appears that the A2003 version runs much slower than the A97 version. Everything from just opening Tables and Queries to running code...
15
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? ...
56
by: Raphi | last post by:
Hi, I've been using an Access application I wrote for an office with the front-end stored on all computers and the back-end on one of them serving as an Access file server. Now we're moving...
0
by: Johanna | last post by:
Hello, Thread was being aborted exception is thrown by my asp.net application. I hope someone could help me with this error that I get in windows 2003 server. This error has not occured with...
20
by: TC | last post by:
I need an automated procedure to copy data from an Access table to a SQL Server table. Speed is important. What is the recommended technique? I can export the data from Access, copy it via FTP,...
27
by: SQL Learner | last post by:
Hi all, I have an Access db with two large tables - 3,100,000 (tblA) and 7,000 (tblB) records. I created a select query using Inner Join by partial matching two fields (X from tblA and Y from...
5
by: Vik Rubenfeld | last post by:
Is there a way to import an MS Access database .mdb file into MySQL running locally on a Mac? Thanks in advance to all for any info.
2
by: geroldmodel | last post by:
I made a single user ms-access 2000 application with lots of VBA code. Runs perfectly on a winXP machine. I installed a fresh Windows 2003 Server on another computer. When I run my access...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.