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: Do selects block truncates?

RE: Do selects block truncates?

From: <genegurevich_at_discover.com>
Date: Fri, 21 Dec 2007 09:52:54 -0600
Message-ID: <OF6FA8AE74.6C13470B-ON862573B8.00572597-862573B8.00573DC5@discover.com>


Ukja,

I just posted a possible explanation to the list - the truncate is considered a DDL and select would block other DDL statements to prevent the table structure from being changed during the execution.

thank you

Gene Gurevich
Oracle MySQL Operations - OMO
224-405-4079

                                                                           
             "Ukja.dion"                                                   
             <ukja.dion_at_gmail.                                             
             com>                                                       To 
             Sent by:                  "'Kurt Franke'"                     
             oracle-l-bounce_at_f         <Kurt-Franke_at_web.de>, "'oracle-l'"  
             reelists.org              <oracle-l_at_freelists.org>            
                                                                        cc 
                                                                           
             12/21/2007 09:34                                      Subject 
             AM                        RE: Do selects block truncates?     
                                                                           
                                                                           
             Please respond to                                             
             ukja.dion_at_gmail.c                                             
                    om                                                     
                                                                           
                                                                           




>this is never a bug but is the consequence of enforcing statement-level
read consistency
>which is always guranteed by oracle.

Can you explain in more detail?
Which relationship does read consistency mechanism have with the blocking of truncate by select operation?
I don't know no concept of "select" blocking any kind of operation in Oracle.
(except some internal lightweight locks like latch or buffer lock, library cache lock/pin, blah blah blah)

-----Original Message-----
From: Kurt Franke [mailto:Kurt-Franke_at_web.de] Sent: Friday, December 21, 2007 10:35 PM To: 'oracle-l'; ukja.dion_at_gmail.com
Subject: RE: Do selects block truncates?

Hi,

...
>
> If select really blocks truncate, it's a amazing bug. :)
>

this is never a bug but is the consequence of enforcing statement-level read consistency
which is always guranteed by oracle.

the only exception from this mechanism is the complete refresh of a materialized view with
"atomic_refresh => FALSE" which then does the truncate wether or not any select is runnig
on the materialized view. active select on the materialized view will break then with
ORA-08103 regards

kf

--
http://www.freelists.org/webpage/oracle-l






--
http://www.freelists.org/webpage/oracle-l
Received on Fri Dec 21 2007 - 09:52:54 CST

Original text of this message

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