Friday, June 28, 2013

Dotnet 3.5 C# windows from run very slow on Win8x64

Hi,


I hope you are accessing a SQL Server Database in your .NET application. I would suggest to check the performance of the database queries used in your application. Also check if you have the appropriate indexes for the tables used in your application. You can also use the StopWatch class to measure the performance of the business process and data access logic used in the code.




Microsoft MVP - ASP/ASP.NET


Dotnet 3.5 C# windows from run very slow on Win8x64

First find out what the Problem is.


Where exactly is it "running slow"? Does the Dataretrieveal take long? Displaying the Data? Have you even enough seperation between the two to figure it out?


How much data do you try to retrieve? What type of data? What is the lowest speed of the entire network from the Computer to the SQL Server? Is it taking a proper path? is it perhaps querying the server in your Development Environment because you hardcoded the IP adress?


Retrievale speed for Internet is irrelevant. Webpages are designed with minimum byte size in mind. And even for Intranets, things like Proxies or the normal chaching can speed up the process tremendously.




Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2


Dotnet 3.5 C# windows from run very slow on Win8x64

Without actually details like Code, Conenction strings and the query, we cannot even guess where the problem is.


Have you checked much the network is taxed out when the 32-bit appliaction is running?


When something "takes too long", there is some part that is taxed out. And the parts are usually the Network, Disk or CPU (in that order).


But from what you tell there is an issue with the Network, namely it only running at 10 MBit/second for some computers. So this sounds like an admin/settings/network issue. Not a programming issue.




Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2


Join Query

Hi,


I have 2 tables as below. My problem is I want to return Task names even if no task records exist.


So for example, there is no data for 2013/06/30. But I still want the task names to be listed...



Output:

name status
RunSpreadsheet NULL
GenerateReport NULL
ReportApproval NULL
PublishReport NULL

Here is my query...



SELECT t.name, tr.status
FROM Tasks t
LEFT JOIN
TaskRecords tr
ON t.taskid = tr.taskid
WHERE taskDate = '2013/06/30'

And the tables...



Any ideas how to do this?


Thanks!


Join Query

Please provide sufficient information for us with DDL Scripts.


Thanks.




bala krishna


Join Query

Try



SELECT t.name, tr.status
FROM Tasks t
LEFT JOIN
TaskRecords tr
ON t.taskid = tr.taskid
and taskDate = '2013/06/30'





Many Thanks & Best Regards, Hua Min


issue with "Order by" clause

I am executing below query



declare @date datetime
set @date='28-Jun-2013'
SELECT [TableName] ,[ColumnName],[RecordId],[ReasonDesc]
FROM [DataValidation]
where CreateDate >= @date
and CreateDate < (@date+1)
Except
SELECT [TableName] ,[ColumnName],[RecordId],[ReasonDesc]
FROM [DataValidation]
where CreateDate between '20-Jun-2013' and @date
order by 4

It is taking more than 5 min but if I remove "Order by" clause then it took only one second. Below is execution plan without order by clause -



Why this is happening? how should I get rid of this?


Thanks in advance