Tom Kitta wrote: > I stand by my previous claim - transactions are used by DBs to set locking > level.
Transactions are used to group statements into atomic units and control the visibility of changes made by concurrent transactions. In some databases locks are used to implement transactions, others use a technique called multiversioning (and I wouldn't be surprised if other options existed somewhere). > Locking is not good for performance. Locking leads to blocking and > that can slow down your DB and thus your application down to a crawl. Carefully designed transactions do not necessarily lead to either locking or blocking. But you have to know exactly what you are doing and how the database you are working with implements transactions internally. And that is very database specific knowledge. For a small example: take a standard MS SQL Server, open a transaction over one connection, update a tuple in a table, open another connection and select the count(*) from that table. The count query will not complete until the update has either been committed or rolled back. Now do the same sequence against MySQL/InnoDB, PostgreSQL, Oracle or any other database that implements multiversioning and you will see that the count query completes before the update has been committed or rolled back. (MS SQL Server 2005 finally has a form of multiversioning implemented, but you need to enable that first.) > There is even a classic example in some of the Adobe CF notes - don't place > user interaction code in cftransaction tag - I don't even go as far as such > extremes, How would you even do that in CF? Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & Flex 2. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271492 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4