db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Inns, Jeff" <ji...@extol.com>
Subject Row Lock versus Table Lock
Date Wed, 03 Jan 2007 15:42:38 GMT
Does any know if the row lock escalation algorithm will behave
differently for the following two statements:

 

1. delete from SCHEMA.TABLE where COLUMN IN (select COLUMN from
SCHEMA.TABLE where COLUMN <= VALUE);

 

2. delete from SCHEMA.TABLE where  COLUMN <= VALUE;

 

 

I'm trying to prevent a table lock.  I'm currently using the second SQL
statement, which is yielding the table lock.  I understand the need for
the table lock.  I also know which property needs to modified to
increase the escalation threshold.  I'm just wondering if the first SQL
statement will not lock the table or even the records that are brought
back in the sub-query result set. I'm hoping the delete statement will
just put a lock on the individual records as the sub query result set is
iterated through.

 

Thanks.

 


Mime
View raw message