Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Type of Lock During a Multiple statement Request- - forum topic by Nishant.Bhardwaj

$
0
0

Hi all,
I have a doubt related to the type of locks during processing the no. of statements in a MSR,just want to clear it.
for eg-
BT
INSERT INTO <tab_C> SELeCt.... ;   --statement 1
UPDATE <tabl_C>...........;   --statement 2
Select * from table_C;  - statement 3
ET
What type of lock would be there on the table when select statement is getting processed.
As this is a multiple statement request then all the 3 statements would be processed as a 
single transaction.. and all locks are relaesed only when the tranaction is completed..
 
if we look at above that - statement 1 will apply a WRITE lock , statement 2 will again apply WRITE LOCK and statment 3 should ideally apply a READ Lock ..
but as WRITE lock cannot be downgraded to READ lock so ideally statment 3 should have a WRITE LOCK applied..
Please correct me i am wrong....or if some one wants to add some thing here...
Cheers!
Nishant

Forums: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>