Click here to Skip to main content
15,899,026 members
Home / Discussions / Database
   

Database

 
AnswerRe: T-SQL Help Pin
Dave Kreskowiak11-Mar-06 17:45
mveDave Kreskowiak11-Mar-06 17:45 
QuestionADO.NET transactions affect performance? Pin
Judah Gabriel Himango10-Mar-06 6:29
sponsorJudah Gabriel Himango10-Mar-06 6:29 
AnswerRe: Transactions affect performance? Pin
Jörgen Sigvardsson10-Mar-06 10:00
Jörgen Sigvardsson10-Mar-06 10:00 
GeneralRe: Transactions affect performance? Pin
Judah Gabriel Himango10-Mar-06 10:34
sponsorJudah Gabriel Himango10-Mar-06 10:34 
GeneralRe: Transactions affect performance? Pin
Jörgen Sigvardsson10-Mar-06 10:52
Jörgen Sigvardsson10-Mar-06 10:52 
AnswerRe: Transactions affect performance? Pin
Jörgen Sigvardsson10-Mar-06 10:04
Jörgen Sigvardsson10-Mar-06 10:04 
GeneralRe: Transactions affect performance? Pin
Judah Gabriel Himango10-Mar-06 10:29
sponsorJudah Gabriel Himango10-Mar-06 10:29 
AnswerRe: Transactions affect performance? Pin
Rob Graham10-Mar-06 12:21
Rob Graham10-Mar-06 12:21 
The answer depends on what you are trying/needing to accomplish. If it is important that all the steps represented by those SqlCommands succeed, or none succeeed, then wrap them in an enclosing transaction, so that any failure will roll back the parts that succeeded. From a performance viewpoint this will incurr some hit since each operation is logged to the transaction log, and only really executed when the commit is issue (the individual steps might even seem to be a bit faster, but the commit will block longer while the writes actually happen). Enclosing all in a transaction also will cause any page locks that are needed to last for the duration of the transaction, so more will be locked for a longer time. A good rule of thumb is to keep transactions as small as reasonably possible wile insuring database consistency. If some of those SqlCommands could be executed without the others succeeding and not leave the database in an inconsistent state, then leave them out of the transaction.
Transactions aren't so much about performance as they are about database integrity. They aren't free, and should be used judiciously as needed to insure database consistency. Performance is an irrelevant criteria for deciding whether or not to use transactions.

Absolute faith corrupts as absolutely as absolute power
Eric Hoffer

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke



-- modified at 18:24 Friday 10th March, 2006
GeneralRe: Transactions affect performance? Pin
Judah Gabriel Himango11-Mar-06 15:29
sponsorJudah Gabriel Himango11-Mar-06 15:29 
AnswerRe: Transactions affect performance? Pin
Rob Graham10-Mar-06 12:26
Rob Graham10-Mar-06 12:26 
QuestionConnect to a remote SQLServer via local proxy Pin
MatthysDT10-Mar-06 1:50
MatthysDT10-Mar-06 1:50 
QuestionSELECT and SET Pin
Brendan Vogt10-Mar-06 1:03
Brendan Vogt10-Mar-06 1:03 
AnswerRe: SELECT and SET Pin
Colin Angus Mackay10-Mar-06 6:04
Colin Angus Mackay10-Mar-06 6:04 
GeneralRe: SELECT and SET Pin
Brendan Vogt12-Mar-06 19:03
Brendan Vogt12-Mar-06 19:03 
QuestionExtract data from MSDE through ADO.NET Pin
smadan10-Mar-06 0:43
smadan10-Mar-06 0:43 
AnswerRe: Extract data from MSDE through ADO.NET Pin
Colin Angus Mackay10-Mar-06 6:08
Colin Angus Mackay10-Mar-06 6:08 
AnswerRe: Extract data from MSDE through ADO.NET Pin
smadan16-Mar-06 19:06
smadan16-Mar-06 19:06 
QuestionSetting up SQL Server 2005 Pin
NewbieDude9-Mar-06 20:21
NewbieDude9-Mar-06 20:21 
AnswerRe: Setting up SQL Server 2005 Pin
Chandana Subasinghe10-Mar-06 7:49
Chandana Subasinghe10-Mar-06 7:49 
GeneralRe: Setting up SQL Server 2005 Pin
NewbieDude12-Mar-06 18:49
NewbieDude12-Mar-06 18:49 
GeneralRe: Setting up SQL Server 2005 Pin
Chandana Subasinghe12-Mar-06 23:54
Chandana Subasinghe12-Mar-06 23:54 
GeneralRe: Setting up SQL Server 2005 Pin
NewbieDude12-Mar-06 23:56
NewbieDude12-Mar-06 23:56 
AnswerRe: Setting up SQL Server 2005 Pin
Chandana Subasinghe10-Mar-06 7:52
Chandana Subasinghe10-Mar-06 7:52 
AnswerRe: Setting up SQL Server 2005 Pin
Illegal Operation12-Mar-06 18:18
Illegal Operation12-Mar-06 18:18 
QuestionSend a Value in to a Parameter field from Formula fields?(Crystal report) Pin
superdragon9-Mar-06 19:59
superdragon9-Mar-06 19:59 

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.