You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Prasenjit Sarkar <ps...@almaden.ibm.com> on 2007/03/16 17:06:42 UTC

How to make view read-only (no locks)?

                                                                            
                                                                            
                                                                            
                                                                            
 I have simple view definition like:
 can I make B READ-ONLY so that no locks are
 B?                                                                         
                                                                            
                                                                            



For DB2, the answer I got was:
                                                                            
                                                                            
                                                                            
 CREATE VIEW v1 AS SEELCT ....FROM ...., TABLE(VALUES (1)) AS A(a);
 optimizer will throw the VALUES(1) out                                     
                                                                            
                                                                            


                                                                            
                                                                            
                                                                            
                                                                            
 There are various clients (and apps, and users, ...) which are             
 rather
 opened on an updatable query will hold a U lock on the row
 even if the isolation level is UR.
 problem. So UR will take no locks.                                         
                                                                            
                                                                            



Whats the answer for Derby (I'm hoping the same)?..)

Prasenjit Sarkar
Almaden Research