.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Post New Web Links

vastly different performance of update query on development machine and on server

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :ASP.Net


Using VisualWebDeveloper 2010 on the development machine. All nice and fast.

Using VisualWebDeveloper 2008 on the server. Server runs on Windows Server 2008 and has IIS 7.

It looks like that when 'table', a datatabe filled up in C# code behind, is getting longer (say 100 rows), then the server (whether running the website on IIS or on the local host of VIsualWebDeveloper2008!!!) is really slowing down. Checked it in debug mode and traced it down to


This line takes 5 seconds to execute, with 100 rows. On the development machine, it takes almost no time.

How can that be?

Are there any know issues? Could it be that there is incompatibility between different version of SQL server or something like that? The update works, it is just awefully slow, but only on the server.

What's going on? And how to solve it?

Thank you.

Best regards,


View Complete Post

More Related Resource Links

MDX query using linked server - performance question

Hi, I'm having a strange performance behavior. When I’m running a mdx query on management studio, it runs for 10 minutes (its mainly calc members on a large cube) When I run the same query via linked server and openquery, it runs for 20 minutes. Is the SQL from some reason does a parsing or running the query twice? The server is sql2008 UP1 on 64bit. and the "allow in process" is checked. its the default in sql2008 Thanks in advance, Yoav  

How to calculate a SQL Server performance of a query based upon table schema, table size, and availa

Hi What is the best way to calculate (without actual access to a SQL Server) the processing speed of a query (self-inner-join) based upon table schema, table size, and hardware (CPU, RAM, Drives)? ThanksThanks Jeff in Seattle

Synchronizing schema from local development machine to remote web server


As a single developer in a small business I'm developing a data-driven website on my local machine using VS2008 Professional (I also have 2010 Professional)

It is then synchronised with a dedicated server using Expression Web (ditto design)

I'm using SqlExpress both machines and as features are added, I want to synchronize the dedicated server schema from the local schema

VS2010 has such a feature, but it's a ____ of a price to pay for one feature - basically adding fields as I add functionality.

I'm surprised SqlServer doesn't have such a feature built in - am I missing something?

(I've trialled RedGate SqlCompare, but it can't access the remote db, and I'm reluctant to enable SqlServer Remote Connections on a machine I don't own).


SQL Server 2008 R2 Report builder - Cannot update a list of fields for the Query



I have existing report connected to SSAS cube. When I try to change the query and click OK, i get this message "Could not update a list of fields for the query. Verify that you can connect to the data source and  your query syntax is correct"

My Query syntax and access to data source dont have any problem.  Because fo this issue, i cannot update the query used in the report. How do i resolved this issue?



Query regarding SQL Server Performance with ADO


Hi All,

We have a production SQL Server 2005 64bit Standard Edition with SP3. We recently moved the database to a virtual machine, after which we are facing a lot of problems with SQL Queries timing out which has brought down the performance. The SQL Server usually runs with 100% CPU usage. While trying to debug the problem we came across a procedure 'sp_cursoropen' in the SQL Server profiler. 


declare @p1 int

set @p1=180150021

declare @p3 int

set @p3=1

declare @p4 int

set @p4=16388

declare @p5 int

set @p5=287164

exec sp_cursoropen @p1 output,N'select * from StatusMessages',@p3 output,@p4 output,@p5 output

select @p1, @p3, @p4, @p5

The procedure is executing a select query on a table 'StatusMessages'. The profiler says the query is being executed by the 'Operating System'?

When i ran the standard report 'Performance - Top queries by total CPU time & Average CPU time' the results show that the query taking up maximum cpu is the select query on the StatusMessages table 'select * from StatusMessages'. I'm not sure why this query is being executed? We use ADO to connect to the database from our applications. Most of the applications are doing a insert into 'StatusMessages' table. We rarely do a select from this table and when we do there is always a

vastly different performance of table update on similar machines



Trying since more than a week to solve this, so far, no solution.

Two machines. One a little faster than the other. The slow one runs windows xp, visual webdeveloper express 2010, sql server 2008. The fast one runs windows server 2008, visual wev developer express 2010, sql server 2008.

The code in queston involves an automatically generated update function in one of the table adapters, called 'adapter'. Our C# code generates a data table called 'table', with which we update our 'datatable' in the table adapter.

The table has about 100 entries.

We then update our datatable in the .xsd file by calling.

int rowsaffected = adapater.Update(table);//this is the line that takes long on fast computer

return rowsaffected > 0;//since function returns a bool

On the slow machine this line of code takes a few milliseconds.

One the fast machine it takes 5 seconds.

These results are consistent. It has nothing to do with one machine being busy, the other idle.

What could be the reason and how could it be solved? How can the same code, on the same platform, on a faster machine take 500 times longer than on a slower machine?

Thank you.

Best regards,


Sql server 2000 Update Query with join


I have 3 tables . I will give the structure.

1) TblAgency   

PCC     SCCode  AgencyName

2) SegmentCalculation

PCC  StatusDate  Segment   YTD

  3) TblStandard                // for get abt this table. this is i am only for taking the  StartDate . Once i will get the Start Month   and Year to InPut Month and Year , we are going to calculate the sum of Segment  from Segmet Tabl

SCC   startDate EndDate  

the above is my 3 table structure

Now i want a query for update  second table 

SegmentCalculation.YTD =( 
SELECT     sum(Segment) as Total       
FROM    SegmentCalculation P
        inner JOIN TblAgency A ON P.PCC = A.PCC
   left JOIN TblStandard T ON A.groupcode = T.SCCode            &n

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

High-Performance .NET Application Development & Architecture

It has always been a goal of project architects to plan an effective strategy from the ground up in regards to an new application. All relevant factors are taken into consideration with respect to the application, from its design and layout to a functional website infrastructure. Pre-.NET strategies and design guidelines still effective now were developed with Microsoft's DNA (Distributed interNet Application) platform. This model successfully served the purpose of architecting N(any number of)-Tier (levels) applications. In its basic sense, as in most robust, distributed applications, you'll architect 3 main layers or Tiers: presentation, business rules and data access.

SQL Server Performance

Improving .NET Application Performance and Scalability
SQL: Scale Up vs. Scale Out
Stored Procedures
Execution Plans
Deployment Considerations

Page not found using ASP.NET Development server


Hi to all forum members

I got this problem. When I try to run a test project I receive "Page not found" in browser opened by ASP.NET Development server. I am logged as administrator to my WIN XP. And I am using VS2005. I had VWD and ASP.NET 2.0 before but  removed everything before installing VS2005. Do you hav eany idea why is this happening.

p.s. I do not use any firewall only nod32 as antivirus program

I will be very glad is someone can help me.

update/delete not working on server only


my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?


HttpHandler works with Visual Studio Development Server debugging, but not otherwise


Hi all,

I'm new to HttpHandlers.  I am writing an HttpHandler that reads uploaded files directly from the request stream to provide progress that can be queried using an AJAX request.  For large files, this seems to be faster than having ASP.NET load the file contents into Request.Files and then streaming the file from there to wherever it goes (Linq to SQL into a VARBINARY column in an SQL Server database.)

My HttpHandler works perfectly when I'm debugging using the Visual Studio Development Server, but doesn't work otherwise.  The application pool for this application in IIS 7 is set to run in Classic Mode, and the Handler Mappings screen in IIS says that I must manage managed handlers in system.web/httpHandlers. 

I set up in my applications Web.config file.

<add verb="GET,POST" path="*.upload" type="Namespace.For.UploadHandler, AssemblyForUploadHandler"/>

It works great, so long as I don't debug with the "Use Local IIS Web server" option.

What else do I need to do to get this to work?


Basic Instincts: Increase LINQ Query Performance


Jared Parsons demonstrates a technique to achieve maximum performance from LINQ queries on large sets of data in order to create a responsive user interface.

Jared Parsons

MSDN Magazine August 2008

SQL Server: Uncover Hidden Data to Optimize Application Performance


SQL Server 2005 gathers a lot of useful data that you can use to identify areas where database performance can be improved. Here's what you need to improve performance.

Ian Stirk

MSDN Magazine January 2008

Agile Development: Extend Team Foundation Server To Enable Continuous Integration


How does Visual Studio 2005 Team System and Team Foundation Server facilitate the process of agile development and continuous integration? Here Ben Waldron explains it all.

Ben Waldron

MSDN Magazine March 2006

Extreme ASP.NET: Tools of the Trade: SQL Server Profiler and Query Analyzer


In my last column, I discussed Microsoft® Application Center Test and how it could be used to measure the performance of your Web application (see Extreme ASP. NET: Tools of the Trade: Application Center Test).

Rob Howard

MSDN Magazine August 2005

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend