db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jefffro <jfe...@us.ibm.com>
Subject Behavior of SELECT with WITH UR and locking
Date Mon, 12 Aug 2013 19:19:35 GMT

Hello, I have the following situation ... 

- in the background an application is loading data into a number of
normalized tables using batches of sql statements.  the net effect of this
process is that one batch/transaction may be relatively long running. 

- at the same time, a read application is querying the database using a view
(of some of the same tables as is being used by the batch sql) but it is
alway using the WITH UR option on the view ... e.g. select a, b from
schema.view where a in (1,2,3) WITH UR;

Problem: At times, the SELECT statement is getting the error that says it is
the loser in acquiring a LOCK. 
Question: Why would a SELECT ... WITH UR statement (which will do dirty
reads trying to get a lock)?  Does Derby have situations where it ignores
the WITH UR expression on selects? ... or is the  error message incorrect (I
know I should have the error message in this post but not available to me at
this moment). 

Thanks, Jeff 

View this message in context: http://apache-database.10148.n7.nabble.com/Behavior-of-SELECT-with-WITH-UR-and-locking-tp133134.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

View raw message