Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Replacing a view with selects on it

Re: Replacing a view with selects on it

From: jaromir nemec <jaromir_at_db-nemec.com>
Date: Mon, 17 May 2004 23:52:20 +0200
Message-ID: <01e201c43c59$3b6d6f00$3c02a8c0@JARAWIN>


Thanks Daniel, Wolfgang and Justin,

@Daniel - I didn't consider a change of a view *structure*. I meant only a change of the data selected in the view, e.g. a change of the where clause in the view. From this point of view the only *repeatable read* requirement is, that the select don't crash or return wrong result if the view is replaced while performed.

@Wolfgang - good point; the only access of the view while parsing the query - but what happen if the query gets out from library cache and needs to be reparsed?

Could there be a situation that it cause some troubles?

@Justin - yes I admit that the safest way is to perform the change direct with DML. The database guaranties that all is transactional safe. But e.g. in case if you have a massive change in a big snapshot it could be preferable to *prepare* the change in stage area and to *publish* the new version of this snapshot via a replacement of a view (e.g. exchange partition and repointing the access view to the new partition)

regards

Jaromir D.B. Nemec

>There is one problem with this that I can see. By changing the view while
another session has referenced it, you invite the
>possibility of a non-repeatable read.

>Unless my understanding is utterly wrong, the view definition is only
>required during the parsing of the query.

>My preference in this sort of environment would be to replace the data
>in a single transaction,



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Mon May 17 2004 - 16:49:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US