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:46:51 -0600
Message-ID: <OFAD9A81D4.89255BAF-ON862573B8.0056836B-862573B8.0056B037@discover.com>


That is possible, although I don't know how to prove that. I did not see any locks held by any sessions at the time (other than two sessions that were waiting to do a truncate)

thank you

Gene Gurevich

                                                                           
             "Jonathan Lewis"                                              
             <jonathan_at_jlcomp.                                             
             demon.co.uk>                                               To 
             Sent by:                  <oracle-l_at_freelists.org>            
             oracle-l-bounce_at_f                                          cc 
             reelists.org                                                  
                                                                   Subject 
                                       Re: Do selects block truncates?     
             12/21/2007 06:49                                              
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             jonathan_at_jlcomp.d                                             
                emon.co.uk                                                 
                                                                           
                                                                           





The blocking session may be running a select now, but possibly it did some updates to the same table without committing before running the select.

Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com

Author: Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

> Subject: Do selects block truncates?
> From: genegurevich_at_discover.com
> Date: Thu, 20 Dec 2007 11:43:30 -0600
>
> Hi all:
>
> I am running oracle 10.2.0.2 and I see two sessions running truncate
> commands being stuck. It looks like they are
> waiting on another session which is currently running a long select. That
> select accesses both of the tables that
> the other two sessions are trying to truncate. I was not aware that a
> select can block a truncate. Is that the case
> or is there something else here which I am missing?
>
>

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






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

Original text of this message

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