>-----Original Message----- Subject: FW: Get New Record ID in ORACLE >From: Adrocknaphobia <[EMAIL PROTECTED]> >Date: Tue, 7 Jun 2005 13:57:35 -0400 >Thread: >http://www.houseoffusion.com/cf_lists/index.cfm/method=messages >&threadid=40594&forumid=4#208851 > >Well there are more (minor) speed benefits. Where as cfquery get >compiled every time procedures do not. A stored procedure may be >faster on the second run and the same speed following; cfquery will be >as slow no matter how many times it's executed.
Not if you use bind variables - in fact, that's the whole point of bind variables: you are telling the db "this is the same query i just ran, but for different values, so go ahead and re use the same query plan from the shared pool". <snip> >I've said this above, but cftransaction is drastically different than >the transaction in a database. Plus it really doesnt fit well in an >MVC pattern. Again, cftransaction doesnt give you row level locking. >Which is pretty key in a database transaction. If you had two >applications using the say schema. Both apps in CF, running seperate >instances or using two seperate DSNs. They know nothing of each other >transactions. You are going to end up with race conditions, which is >what the transaction in the database will prevent. not too sure i understand what you mean here. CF (used without cftransaction) has a dirty habit of committing after each and every cfquery, whereas as you pointed out cftransaction just delays the commit, which allows oracle to manage the transaction. Oracle will lock the rows you are updating and will place a ROW SHARE TABLE lock on the table to make sure nobody else can change the structure of the table. But if the two sessions want to change different rows in the same table there should be no problem. Are you sure you aren't thinking of deadlocks - where two sessions both need the other to commit before being able to continue - the famous user 1 updates A, user 2 updates B, user 1 updates B (has to wait for user 2 to commit - blocked but not deadlocked), user 2 updates A (has to wait for user 1 to commit... bingo deadlock)? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208858 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

