SQL Server communication slow when using Vista or Windows

  • I have a small program written in Delphi used for our church's administration which uses an SQL2000 database. Other churches now use it as well. 2 years ago I installed it on a computer with Vista, and as a result I had to use SQL 2005 for the first time. We had found it to be horribly slow in all functions, with a sample procedure that would take less than 1/2 a second to be perfomed on an XP/SQL2000 machine (Pentium 4) taking over 17 seconds to be performed on this dual core machine with Vista/SQL 2005. Now I have a church with a brand new computer running Windows 7 for which I used SQL 2008. I had the same problem, with this sample procedure taking over 17 seconds. From this I surmise that it is a problem with SQL's communication with Vista or Windows 7.

    I have found other people complaining about the same problem with Vista. Some people have found a fix by disabling the Receive Window Auto Tuning Level for TCP/IP communications as described on this page (http://www.vistax64.com/tutorials/72308-auto-tuning-tcp-ip-receive-level.html). Unfortunately trying any of these options (disabled, restricted or high tuning levels) did not have any impact for my program.

    I also understand that you can get around it by running an XP emulator in Vista or Windows 7 and installing the program under that. That seems to provide further proof that it is something that the Windows 7/Vista operating system is doing with SQL communications since an XP emulator running within those operating systems is not impacted. I want to try to avoid this work around as it seems a bit messy to me especially with users that are not that sophisticated at computer use.

    I would be grateful if anyone who had this issue and solved it would provide me with some assistance on this.

  • Two things Vista and 7 comes with new data access so you may have to change your connection code to manually reference MDAC. Then there is the issue of x86 code running in x64 which may create some issues.

    Kind regards,
    Gift Peddie

  • I had forgotten to say that in all cases I am using 32 bit versions of all the software and I am using SQL Express 2008 (the free version). I have port 1433 open in the Windows Firewall. The database has only 2 tables, both newly created by importing data from excel. Neither table has indexes. One table is customer info consisting of about 30 fields and it curently has 330 records in it. The second is a list of receivables with only 16 records in it. My test procedure that I mentioned runs through the customer table and does a count of who is a member of the church and who isn't. Taking 17 seconds to count through 330 records is scary (a blistering pace of 19 records per second). I have now installed the XP virtualization within Windows & and installed SQL Express 2008 within that. The procedure then takes about 5 seconds to run in the XP virtualization as compared to the 17 seconds running within Windows 7. That is still slower than running it in native XP.

  • Michael Jeffrey (2/11/2010)


    I had forgotten to say that in all cases I am using 32 bit versions of all the software and I am using SQL Express 2008 (the free version). I have port 1433 open in the Windows Firewall. The database has only 2 tables, both newly created by importing data from excel. Neither table has indexes. One table is customer info consisting of about 30 fields and it curently has 330 records in it. The second is a list of receivables with only 16 records in it. My test procedure that I mentioned runs through the customer table and does a count of who is a member of the church and who isn't. Taking 17 seconds to count through 330 records is scary (a blistering pace of 19 records per second). I have now installed the XP virtualization within Windows & and installed SQL Express 2008 within that. The procedure then takes about 5 seconds to run in the XP virtualization as compared to the 17 seconds running within Windows 7. That is still slower than running it in native XP.

    Could you post the code you are running?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply