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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Performance issues

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :Sql Server
I'm creating a data warehouse for our product and I am having some issues with system performance when posting data to the database. My test application is written in C#, not that I think that is the problem. I am executing stored procedures to perform the updates. The problem is that I am trying to get around three million updates to perform in a day. Part of my problem is that the SQL server starts to eat memory like no other, forcing the OS to page to the point that my whole system becomes unstable. To simplify client side coding, I have the stored procedure check to see if there is a maching, by key, record and if so, perform an update and if not perform an insert. Would it be better to have the client side attempt the insert first with an SQL insert statement then switch to the update if the key violation occurs?   A sample procedure is as follows: CREATE PROCEDURE [dbo].[sp_UpdateAgents]( @AppName AS VARCHAR(20), @AgentID AS VARCHAR(16), @FirstName AS VARCHAR(30) = null, @LastName AS VARCHAR(30) = null, @PhoneNumber AS VARCHAR(10) = null, @Extension AS VARCHAR(10) = null, @Station AS VARCHAR(10) = null, @PrimaryTeam AS VARCHAR(16) = null ) AS BEGIN DECLARE @rval AS INT; DECLARE @a AS VARCHAR(20); DECLARE C CURSOR FOR SELECT AppName FROM Agents WHERE AppName = @AppName AND AgentID = @AgentID; OPEN C; FETCH NEXT FROM C INTO @a; SET @rval = @@FETCH_

View Complete Post

More Related Resource Links

Troubleshooting IIS 7 network performance issues and TCP Chimney Offload, Receive Side Scaling, and

There is a lot of posts on http://forums.iis.net related to network performance.  Actually, there was two today!.  The problems can be different, but the common thread seems to be network performance.  Windows Server 2008 (and R2) enabled a new network feature by default which has been referred to as "Scalable Networking Pak".  Some people refer to the feature as TCP Chimney Offload.  Either way, in my experience this feature causes more issues than it solves.  If you are having a network related issue or performance, this is a easy setting to check and verify if disabling portions or all of them can resolve the issue.   KB article on TCP Chimney Offloadhttp://technet.microsoft.com/en-us/network/dd277645.aspx KB Article how to show your settings and disablehttp://support.microsoft.com/kb/951037 I strongly encourage test these changes in a non-production environment before making changes to your production systems! Enjoy, Steve SchofieldMicrosoft MVP - IIS

SSRS 2008 R2 Add-in Performance Issues

I have a very interesting issue with a customer.  They use lots of images in their reports.  The report performance is very poor after deploying the report to Sharepoint Integrated Mode and executing the report from Sharepoint Report Viewer.   The single server is setup with SQL Server 2008 R2.  Sharepoint and Reporting Services are running all on the same server.    The goal is to be able to use the Report Viewer Web Part and Sharepoint Filters to create Dashboards.   We have tried the following ways to get satisfactory performance out of these reports:  ·         When we run the reports in a page viewer web part in Sharepoint against a native SQL 2008 Report Manager on another server, they execute great ·         When we run the reports in a page viewer web part in Sharepoint against the Sharepoint Integrated Report server on same server, they execute way more quickly then when using the Report Viewer against the same Sharepoint Integrated Report server . ·         When we remove the images from the reports  and execute the reports via report viewer or in the Integrated library they execute satisfactorily in both Report Manager and Sharepoint Integrated - but th

Performance Issues


We have a .net website which uses a sql backend, masterpages, skins, etc.

Here is the problem. I open the same page with the same data and same controls on the page.

Sometimes it shows this performance pattern where it takes less than half a second to load the page (notice the highlighted row and duration column):


And sometimes it shows this performance pattern where it takes close to 6 seconds to load the page:


Why does this happen? It is the same exact same code and exact same data. Is there something that can be done to the server?

"I have no particular talent. I am merely inquisitive." -- Albert Einstein

Reporting Services 2008 Performance Issues

We are experiencing longer than should be, although intermittent, response times from Reporting Services server when requesting reports via HTTP.  Here's what we've done to try and locate the issue.
  1. We used the FireFox Net panel to locate the request that appears to be the culpret - it is the '...Pages/Report.aspx?ItemPath=...' request.  This request sometimes returns in 2 seconds and sometimes it takes 20+ seconds
  2. We have checked the Reporting Services ExecutionLogStorage table to see the actual report querying, processing and rendering times for the report and since the report has been up, the total time reported by Reporting Services is less than 3 seconds total (even less than 1 second most of the time)
  3. We're almost positive that there isn't a network issue - we're able to ping the server (although on a different subnet) while the report is taking it's 20+ seconds to return and the network has excellent ping results
  4. We've run a packet sniffer during the http request of the report - the browser sends a few messages to the server, the server responds.&n

Data flow task - performance issues


We recently migrated packages from DTS to SSIS 2008. However the performance seems to be drastically reduced (what was taking under 30 mins is now taking nearly 2 hrs)

On analysis we see that the degradation is mainly with the data transform tasks which load from flat file to sql server tables. (all other factors such as environment, etc are unchanged)

Any suggestion on how this can be improved?

performance issues with calling java webservices from WPF application?


I'm experiencing some major performance issues when calling a Java webservice from my WPF application. If I call the same webservice from a Java test application, I get a return in under 1 second. If I create a new .NET console application and make the same service call, I get a return in under 1 second as well:

class Program
 public Program()

 static void Main(string[] args)
  MyService svc = new MyService();
  for (int i = 0; i < 10; i++)
  Console.WriteLine("calling echo()");
  DateTime startTime = DateTime.Now;
  string result = svc.echo("Test " + i);
  DateTime endTime = DateTime.Now;
  TimeSpan ts = endTime.Subtract(startTime);
  Console.WriteLine("Execution Time = " + ts.TotalSeconds + " seconds, result=" + result);

However, when I try to call this same service from a WPF application, my response times range from 6-8 seconds. I tried moving the webservice calls to a BGW thread without any luck. I'm running the sample WPF application on the same machine as the sample .NET console application so it's not a network-related issue. Can someone explain why the execution times of calling the Java webservice below is so much slower when done from within a WPF application?

public partial class MainWindow : Window
 private MyServi

Performance issues



I am using ASP.NET 2.0 web application.  

The client says that performance of the site is low. I have done gzip compression as well as fixed some of the issues after checking with fiddler.

I have done the steps told in 


Still my client says, performance has not increased.

Is there any tool which can measure or monitor other factors like network bandwidth, process running in client system etc.

Also What other things can be done to increase the performance?

Thank you

Regarding performance issues by using memory stream



i created one project.

many persons will use my project at a time. in that project if any person got error,that error has written to one file by creating object to memory stream.

if all persons got error then that number of objects will be created at a time and all objects will write errors to same file at a time. so here i think there are 25 hits per second.

is there any problems and performance issues by using memory stream ? please help me.

Sharepoint solution that calls WCF services has performance issues on production machines


I've a SharePoint solution that consists of set of webparts and other features. The webparts backend call a set of WCF web services. When I tried to install it on a production machine, it has some performance issues, I can open the page and wait for 30 min till it response to me.

If I call the same WCF services from a console application they works fine in both machines, if I creates a SharePoint team site it works fine in both machines, everything works fine on the dev machine.

The WCF services do some CRUD operations in a database and some API calls to SharePoint and PerformancePoint APIs

Development machines Specs:


Windows Server 2008 R2 Enterprise, 64-bit

SSIS 2008 SCD Performance Issues



We are having 20 dimension tables and each table will be having around 20 million records.

These tables would be loaded on a daily frequency with 5 files, each of 3 million records.

We are currently using SCD transformation for TYPE2 load of data.( to maintain history in the dimension table.)

But SCD is taking a long time to insert the data and below are the statistics that I recorded when I executed the package with sample files:

Run1: File1(0.5 million records)  -2 minutes  (Dimension Table is empty)
Run2: File2(0.5 million records)  -13 minutes (Table has  589,000 records)
Run3: File3(0.5 million records)  -26 minutes (Table has 1,140,000 records)
Run4: File4(0.5 million records)  -37 minutes (Table has 1,680,000 records)
Run5: File5(1 million records)   -51 minutes (Table has 2,780,000 records)

Package elapsed time : 2 hr 9 min

1. How do i improve the performance of the SCD? If not, is there any way of loading a table parallely from file so that i can achive performance?

2. In informatica, we have a partitioning feature to load the data parallely which greatly improves performance. Is there any equivalent feature or workaround in SSIS?

Any help would be greatly appreciated.



SqlXmlBulkload 4.0 Performance issues



I have been working on a project to import a large number of xml files into a database. I have a steady program to do so using SqlXmlBulkload. Everything works fine and Data is imported correctly. The issue I am facing is related to volume. I have atleast 10,000 files to be imported and each xml file is taking approx 3 min to be imported (which is too much).  

The file size is approx 900KB each.

Total number of tables in database - 835

Does anyone now if there are Memory leak issues with SqlXmlBulkload? Can we have SQLXmlBulkload run in multiple threads ?

I have invested too much time in the project to get all the sql annotations right and dont want to discard SqlXmlBulkload due to performance issues. Any help will be appreciated. Below is the code that I am using.




Visual Studio 2010 SP1 Performance Issues After Upgrade



I was unhappy with VS 2010 performance on my machine:

OS Name    Microsoft Windows XP Professional
Version    5.1.2600 Service Pack 3 Build 2600
System Type    X86-based PC
Processor    x86 Family 6 Model 37 Stepping 5 GenuineIntel ~2393 Mhz
Total Physical Memory    4,096.00 MB

Graphics: Intel HD graphics, internal 128mb


Basically the UI kept hanging when closing tabs on the workspace or under general

navigation of UI.


I eventually found this fix:


which suggested turning off hardware rendering and it worked a treat.

General UI responsiveness was massively improved.

I see that this was recognised and VS comes with SW rendering as standard now for SP1 on XP.

However the upgrade to SP1 seems to have brought this problem back even though hardware rendering is disabled!

Has anyone else noticed this behaviour?

Is there any suggestions?


Here is my info from VS:

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel

Installed Version: Premium


MSSQL performance issues

We recently migrated a couple of databases from SQL Server 2000 over to SQL Server 2005. Four or five after the move, we are experiencing some heavy reads (going from 2 million to 8million) from some queries that were going against these databases. We looked at the query plans and compared our qa servers to the production servers. The only difference in the two environments was within one of the heavy queries. The QA server was using a clustered index scan which was taking 30% of the job compared to production which was using a index scan which was using 75% of job. We ran update statistics which temporarly caused the reads to go down in size. But sporadically during the day, it will go back to 8 million reads without any cause we can see. Does any one have any sugguestions?

ASP.NET Best Practices for High Performance Applications

This article lists the techniques that you can use to maximize the performance of your ASP.NET applications. It provides common issues, design guidelines, and coding tips to build optimal and robust solutions.

Top .NET Performance Problems and how to avoid them

Every time I work with one of our .NET customers to help them with managing their application performance I come across the same problems as seen with other clients before: lots of ADO.NET queries, many hidden exceptions in core or 3rd party .NET libraries, slow 3rd party components, inefficient custom code

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.

How to improve the performance of ASP.NET MVC web applications

It is an in depth analysis of a Digg-like site and how it went from serving (on a test machine) 6 req/sec to 390 req/sec.

The biggest gain, 74 req/sec to 390 req/sec happened when he introduced data caching and another 25 req/sec where gained when he introduced the compilation of LINQ queries.
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