Click here to Skip to main content
15,911,039 members
Home / Discussions / Database
   

Database

 
GeneralRe: Varbinary field comparisons Pin
cpritt14-Sep-04 18:57
cpritt14-Sep-04 18:57 
GeneralRe: Varbinary field comparisons Pin
Jon Rista15-Sep-04 7:16
Jon Rista15-Sep-04 7:16 
GeneralRe: Varbinary field comparisons Pin
cpritt15-Sep-04 8:54
cpritt15-Sep-04 8:54 
GeneralRe: Varbinary field comparisons Pin
Jon Rista30-Sep-04 18:52
Jon Rista30-Sep-04 18:52 
GeneralExtreme performance issues (SQL Server 2000/ADO.NET/C#) Pin
Jon Rista14-Sep-04 8:14
Jon Rista14-Sep-04 8:14 
GeneralRe: Extreme performance issues (SQL Server 2000/ADO.NET/C#) Pin
Steven Campbell14-Sep-04 9:34
Steven Campbell14-Sep-04 9:34 
GeneralRe: Extreme performance issues (SQL Server 2000/ADO.NET/C#) Pin
Steven Campbell14-Sep-04 9:35
Steven Campbell14-Sep-04 9:35 
GeneralRe: Extreme performance issues (SQL Server 2000/ADO.NET/C#) Pin
Jon Rista14-Sep-04 13:13
Jon Rista14-Sep-04 13:13 
Thanks for the questions. First, let me answer them:

1) I'm not sure what you mean by "synchronously". I just call sqlCommand.ExecuteNonQuery() after setting up the parameters.

2) Yes, I was. I eliminated them after adding a temp sp that I ran from Query Analyser. I added a SQL transaction around calls to all my other stored procedures, and processing time jumped a ton. I let it run for just over a half hour then killed it. I think transactions may have been the problem, or at least a large part of it. I don't know why, but my queries, which are few but complex, may just be too much to transact.

3) SQL Server is running at a normal priority (priority level 7).

4) All of .NET is fully updated to the latest. We actually have a few versions, but the code has a .exe.config specifying which version to use.

5) I'm connecting to SQL Server using TCP/IP.

6) Shared memory protocol is disabled.

7) I'm executing with ExecuteNonQuery().

8) I have not been using SET NOCOUNT ON. I forgot all about that, but I'll try adding it in a moment and see what happens.

Now, to my questions. What exactly happens when you run queries through a transaction? Do the changes made get marked in a certain way, or is there some more extensive processing done to properly transact a set of queries/procedure calls? When I ran each of these stord procedures one by one, manually in QA, each one took between 1 and 20 seconds to run. The whole process couldn't have even taken a minute, even including the time for me to type the commands. Is it really possible that enabling transactions could induce a performance hit of at least 240%, possibly more? What kind of difference is there in performance between using true SQL Server transactions, and ADO.NET SqlTransaction?

I've used transactions, and ADO.NET SqlTransactions, in the past. I've never run into such performance issues, but then again, I've never transacted a set of queries as complex as these. There arn't many of them, maybe 20 total, but they are all fairly complicated queries with lots of summations, a couple subqueries, and an average of 3 joins per query (except for DELETE's). Maybe some resources on SQL Server transactions, tips on improving their performance, proper ordering of queries and proper query structuring to maximize performance might help. I've been searching the net, but havn't found anything truely helpful yet.

Thanks for the tips so far. Wink | ;)

GeneralRe: Extreme performance issues (SQL Server 2000/ADO.NET/C#) Pin
Steven Campbell14-Sep-04 14:08
Steven Campbell14-Sep-04 14:08 
GeneralRe: Extreme performance issues (SQL Server 2000/ADO.NET/C#) Pin
Jon Rista14-Sep-04 14:26
Jon Rista14-Sep-04 14:26 
GeneralWorking with a database Pin
Britnt714-Sep-04 2:17
Britnt714-Sep-04 2:17 
QuestionHow to display message when record is not found? Pin
DotNet13-Sep-04 23:00
DotNet13-Sep-04 23:00 
AnswerRe: How to display message when record is not found? Pin
Colin Angus Mackay14-Sep-04 2:52
Colin Angus Mackay14-Sep-04 2:52 
GeneralRe: How to display message when record is not found? Pin
DotNet14-Sep-04 2:59
DotNet14-Sep-04 2:59 
GeneralRe: How to display message when record is not found? Pin
Steven Campbell14-Sep-04 4:35
Steven Campbell14-Sep-04 4:35 
GeneralRe: How to display message when record is not found? Pin
DotNet14-Sep-04 4:56
DotNet14-Sep-04 4:56 
GeneralSQL Server/Access Import Issue Pin
Ossmer13-Sep-04 21:45
Ossmer13-Sep-04 21:45 
GeneralNew data row in data set- without disturbing IIS ! Pin
aBaste13-Sep-04 20:58
aBaste13-Sep-04 20:58 
GeneralRe: New data row in data set- without disturbing IIS ! Pin
Steven Campbell14-Sep-04 8:13
Steven Campbell14-Sep-04 8:13 
GeneralOdbcDataAdapter OR OleDbDataAdapter Pin
Salil Khedkar13-Sep-04 2:54
Salil Khedkar13-Sep-04 2:54 
GeneralRe: OdbcDataAdapter OR OleDbDataAdapter Pin
David Salter13-Sep-04 3:33
David Salter13-Sep-04 3:33 
GeneralRe: OdbcDataAdapter OR OleDbDataAdapter Pin
Salil Khedkar13-Sep-04 20:43
Salil Khedkar13-Sep-04 20:43 
GeneralRe: OdbcDataAdapter OR OleDbDataAdapter Pin
David Salter14-Sep-04 10:59
David Salter14-Sep-04 10:59 
GeneralRe: OdbcDataAdapter OR OleDbDataAdapter Pin
cmk14-Sep-04 15:58
cmk14-Sep-04 15:58 
GeneralRe: OdbcDataAdapter OR OleDbDataAdapter Pin
Salil Khedkar14-Sep-04 20:19
Salil Khedkar14-Sep-04 20:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.