Just as a quick note on this, there are some instances when using cftransaction around a SELECT query can be beneficial, for instance in a busy database sometimes you won't want SELECT queries waiting around for resource locks to be dropped on tables that are being inserted into, you could then use <cftransaction isolation="read_uncommited"> and it'll read 'dirty' data.
This is discussed on Ben Nadels blog which I was reading just a week or so ago. http://www.bennadel.com/blog/477-SQL-Server-NOLOCK-ROWLOCK-Directives-To-Imp rove-Performance.htm Rob -----Original Message----- From: Ray Thompson [mailto:[email protected]] Sent: 21 January 2009 13:32 To: sql Subject: RE: cftransaction for SELECT statements You do not need the CFTRANSACTION around select statements. The CFTRANSACTION statement is used around a group of queries that update the database and will not commit the changes until all the queries are successful. Ray Thompson Tau Beta Pi (www.tbp.org) The Engineering Honor Society 865-546-4578 -----Original Message----- From: Pat Larrea [mailto:[email protected]] Sent: Tuesday, January 20, 2009 4:56 PM To: sql Subject: cftransaction for SELECT statements Hi all, I have a question about the use of cftransaction tag. I've been reviewing the source code of the system of my company, where I started to work recently, and found that in some parts this tag is used just to wrap some (about 10) SELECT statements ( without INSERT, UPDATE o DELETE). I doubt that this kind of use has an positive effect, on the contrary it seems to me that it affects the performance. I don't have much experience in Coldfusion, so I'm not sure if my impression is correct but I've never seen any example of the use of cftransaction tag only with SELECT statements. I'd appreciate if someone could tell me how this use of cftransaction afects the performance of retrieving data. The DB we use is SQL Server 2000. Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3180 Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6
