![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I am not even sure if this is the right place to post, and I will admit upfront I am fairly new at SQL programming. I have written an application for a non-profit and deployed at their office using SQL Server 2008 Express edition. When I do an upate of data from my application on the machine that SQL server is installed, the update takes around 5 seconds. When I do an update of the same data from my application on an XP machine, the same update takes around 90 seconds. Same software, same data, only difference is machines. Server machine is Server 2008. Client machine is Win XP. The application is written in C# and I am using LINQ to SQL to read/write data. Any help in explaining the speed difference (and how to eliminate it), would be greatly appreciated. Thanks |
#3
| |||
| |||
|
|
Ah, not being a LINQ fan, I can't say that I've heard of anyone use the terms "performance" and "LINQ" in the same sentence. I would turn on the SQL Profiler to see what's getting sent to the server by your application. It could be LAN latency or routing issues that are not seen when connecting with the Shared Memory provider but I expect that it's just extra overhead added by LINQ. -- __________________________________________________ ________________________ William R. Vaughn President and Founder Beta V Corporation Author, Mentor, Dad, Grandpa Microsoft MVP (425) 556-9205 (Pacific time) Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition) http://betav.com http://betav.com/blog/billva __________________________________________________ __________________________________________ "jdc" <jdc (AT) discussions (DOT) microsoft.com> wrote in message news:B2CCE2C9-8D0F-435A-AF86-A758A0EDBA60 (AT) microsoft (DOT) com... Hi, I am not even sure if this is the right place to post, and I will admit upfront I am fairly new at SQL programming. I have written an application for a non-profit and deployed at their office using SQL Server 2008 Express edition. When I do an upate of data from my application on the machine that SQL server is installed, the update takes around 5 seconds. When I do an update of the same data from my application on an XP machine, the same update takes around 90 seconds. Same software, same data, only difference is machines. Server machine is Server 2008. Client machine is Win XP. The application is written in C# and I am using LINQ to SQL to read/write data. Any help in explaining the speed difference (and how to eliminate it), would be greatly appreciated. Thanks |
#4
| |||
| |||
|
|
Does LINQ use the SQL Server Native Client? One possibility: Perhaps your SQL Server Native Client on the XP computer is attempting to connect via named pipes. Named pipes is not enabled on the client. After 85 seconds the connection attempt times out. Then it tries the next protocol such as TCP. It connects right away and returns results. Or the other way around trying TCP first and then named pipes? Use SQL Server Configuration Manager on the server to see which protocols are enabled. Use SQL Server Configuration Manager on the client to determine the order of protocol connection attempts. -- Rick Byham (MSFT), SQL Server Books Online This posting is provided "AS IS" with no warranties, and confers no rights. "William Vaughn (MVP)" <billva (AT) NoSpamBetav (DOT) com> wrote in message news:27BB7C09-99ED-4877-80A2-540C4280C6E7 (AT) microsoft (DOT) com... Ah, not being a LINQ fan, I can't say that I've heard of anyone use the terms "performance" and "LINQ" in the same sentence. I would turn on the SQL Profiler to see what's getting sent to the server by your application. It could be LAN latency or routing issues that are not seen when connecting with the Shared Memory provider but I expect that it's just extra overhead added by LINQ. -- __________________________________________________ ________________________ William R. Vaughn President and Founder Beta V Corporation Author, Mentor, Dad, Grandpa Microsoft MVP (425) 556-9205 (Pacific time) Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition) http://betav.com http://betav.com/blog/billva __________________________________________________ __________________________________________ "jdc" <jdc (AT) discussions (DOT) microsoft.com> wrote in message news:B2CCE2C9-8D0F-435A-AF86-A758A0EDBA60 (AT) microsoft (DOT) com... Hi, I am not even sure if this is the right place to post, and I will admit upfront I am fairly new at SQL programming. I have written an application for a non-profit and deployed at their office using SQL Server 2008 Express edition. When I do an upate of data from my application on the machine that SQL server is installed, the update takes around 5 seconds. When I do an update of the same data from my application on an XP machine, the same update takes around 90 seconds. Same software, same data, only difference is machines. Server machine is Server 2008. Client machine is Win XP. The application is written in C# and I am using LINQ to SQL to read/write data. Any help in explaining the speed difference (and how to eliminate it), would be greatly appreciated. Thanks |
#5
| |||
| |||
|
|
That was a huge help, and got me looking at the right thing. I added "Network Library=DBNMPNTW" to my connection string, forcing the connection to Named Pipes, and it solved the problem. Still slower over the network, i.e. 6 seconds on the local machine, about 16 on the client, but this is fine. It is a big data set, updating numerous tables. I still have lots of things I can do code-wise to optimize, but this solved a huge problem where I didn't have a clue. Anyway, thanks again for pointing me in the right direction Jay "Rick Byham, (MSFT)" wrote: Does LINQ use the SQL Server Native Client? One possibility: Perhaps your SQL Server Native Client on the XP computer is attempting to connect via named pipes. Named pipes is not enabled on the client. After 85 seconds the connection attempt times out. Then it tries the next protocol such as TCP. It connects right away and returns results. Or the other way around trying TCP first and then named pipes? Use SQL Server Configuration Manager on the server to see which protocols are enabled. Use SQL Server Configuration Manager on the client to determine the order of protocol connection attempts. -- Rick Byham (MSFT), SQL Server Books Online This posting is provided "AS IS" with no warranties, and confers no rights. "William Vaughn (MVP)" <billva (AT) NoSpamBetav (DOT) com> wrote in message news:27BB7C09-99ED-4877-80A2-540C4280C6E7 (AT) microsoft (DOT) com... Ah, not being a LINQ fan, I can't say that I've heard of anyone use the terms "performance" and "LINQ" in the same sentence. I would turn on the SQL Profiler to see what's getting sent to the server by your application. It could be LAN latency or routing issues that are not seen when connecting with the Shared Memory provider but I expect that it's just extra overhead added by LINQ. -- __________________________________________________ ________________________ William R. Vaughn President and Founder Beta V Corporation Author, Mentor, Dad, Grandpa Microsoft MVP (425) 556-9205 (Pacific time) Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition) http://betav.com http://betav.com/blog/billva __________________________________________________ __________________________________________ "jdc" <jdc (AT) discussions (DOT) microsoft.com> wrote in message news:B2CCE2C9-8D0F-435A-AF86-A758A0EDBA60 (AT) microsoft (DOT) com... Hi, I am not even sure if this is the right place to post, and I will admit upfront I am fairly new at SQL programming. I have written an application for a non-profit and deployed at their office using SQL Server 2008 Express edition. When I do an upate of data from my application on the machine that SQL server is installed, the update takes around 5 seconds. When I do an update of the same data from my application on an XP machine, the same update takes around 90 seconds. Same software, same data, only difference is machines. Server machine is Server 2008. Client machine is Win XP. The application is written in C# and I am using LINQ to SQL to read/write data. Any help in explaining the speed difference (and how to eliminate it), would be greatly appreciated. Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |