Return-Path: <oracle-l-bounce@freelists.org>
Delivered-To: 2-oracle-l@orafaq.com
Received: (qmail 12734 invoked from network); 20 Dec 2007 13:02:41 -0600
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by static-ip-69-64-49-119.inaddr.intergenia.de with SMTP; 20 Dec 2007 13:02:40 -0600
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B527A7DD8BE;
 Thu, 20 Dec 2007 14:02:41 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 11922-09; Thu, 20 Dec 2007 14:02:41 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2EADD7DD7CE;
 Thu, 20 Dec 2007 14:02:41 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Thu, 20 Dec 2007 13:15:16 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 427467DDA8D
 for <oracle-l@freelists.org>; Thu, 20 Dec 2007 13:15:16 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 06199-06 for <oracle-l@freelists.org>;
 Thu, 20 Dec 2007 13:15:16 -0500 (EST)
Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id F22177DDA46
 for <oracle-l@freelists.org>; Thu, 20 Dec 2007 13:15:15 -0500 (EST)
Received: by wr-out-0506.google.com with SMTP id c49so2460537wra.1
        for <oracle-l@freelists.org>; Thu, 20 Dec 2007 10:15:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references;
        bh=zs47bw+m81lkMP8e5Co37aIH6f5RkaZto5E/4kDvi3E=;
        b=uXjq41bKEgDvslak3sm1ObEx3DurNPO4+L0uyUE80Zmgka95W++ObIbnG717XHoKUFKtYo2jznlHaHltgnW9aFPOQfFHSLb1r6kpgxQQ4OqhDBo3hpPkgA2R04JDCKrb62aIhLEF5rSIsX3kvtGhn9VXKcaRrjbvHz7DUaa5SHg=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references;
        b=AoNgToZkdP3uhKnusyuWbeZ3KTbPKJ4RByIcr3bxQVHiNPKuBAlebZ0vJoz+yEmZrvUPKyQ0Ge7XCbeI/x1cgeXJHq/da3uvrSgJUbKw+JgQhVfPUemyy3JlEqvYbQPRWXsHfNYkfEft4R8HQPLi9zUJOxwiPxBCmXjnTZBUWDA=
Received: by 10.143.6.1 with SMTP id j1mr237979wfi.45.1198174513932;
        Thu, 20 Dec 2007 10:15:13 -0800 (PST)
Received: by 10.142.11.19 with HTTP; Thu, 20 Dec 2007 10:15:13 -0800 (PST)
Message-ID: <bf46380712201015l14c7e2f1saf9e2c587f62f967@mail.gmail.com>
Date: Thu, 20 Dec 2007 10:15:13 -0800
From: "Jared Still" <jkstill@gmail.com>
To: genegurevich@discover.com
Subject: Re: Do selects block truncates?
Cc: oracle-l <oracle-l@freelists.org>
In-Reply-To: <OF51C7C2C5.357B046A-ON862573B7.00611597-862573B7.00615E1B@discover.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_28956_24718862.1198174513961"
References: <607D6181D9919041BE792D70EF2AEC482434DC@LIMENS.sivsa.int>
	 <OF51C7C2C5.357B046A-ON862573B7.00611597-862573B7.00615E1B@discover.com>
X-archive-position: 4048
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: jkstill@gmail.com
Precedence: normal
Reply-to: jkstill@gmail.com
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:steve.adams@ixora.com.au>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l
X-Virus-Scanned: Debian amavisd-new at localhost.localdomain
------=_Part_28956_24718862.1198174513961
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Dec 20, 2007 9:43 AM, <genegurevich@discover.com> wrote:

>
> 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?
>

I don't believe that the SELECT is blocking the truncate.

This is easy to test.

In session 1:

drop table rbg;

create table rbg
as
select *
from
dba_objects
/

insert /*+ append */
into rbg
select * from rbg;

commit;

insert /*+ append */
into rbg
select * from rbg;

commit;

insert /*+ append */
into rbg
select * from rbg;

commit;

insert /*+ append */
into rbg
select * from rbg;

commit;

In session 2:

select * from rbg;

Back to session 1:
truncate table rbg;

Back to session 2:

PUBLIC
/588bb8e2_ObjectStreamField                                        30790
SYNONYM             08/14/2006 14:37:42 04/13/2007 17:59:12
2006-08-14:14:37:42 VALID   N N N

ERROR:
ORA-08103: object no longer exists

22700 rows selected.

This is on 10.2.0.3


-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

------=_Part_28956_24718862.1198174513961
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Dec 20, 2007 9:43 AM,  &lt;<a href="mailto:genegurevich@discover.com">genegurevich@discover.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I am running oracle <a href="http://10.2.0.2" target="_blank">10.2.0.2</a> and I see two sessions running truncate<br>commands being stuck. It looks like they are<br>waiting on another session which is currently running a long select. That
<br>select accesses both of the tables that<br>the other two sessions are trying to truncate. I was not aware that a<br>select can block a truncate. Is that the case<br>or is there something else here which I am missing?<br>
</blockquote></div><br>I don&#39;t believe that the SELECT is blocking the truncate.<br><br>This is easy to test. <br><br>In session 1:<br><br>drop table rbg;<br><br>create table rbg<br>as<br>select *<br>from<br>dba_objects
<br>/<br><br>insert /*+ append */<br>into rbg<br>select * from rbg;<br><br>commit;<br><br>insert /*+ append */<br>into rbg<br>select * from rbg;<br><br>commit;<br><br>insert /*+ append */<br>into rbg<br>select * from rbg;
<br><br>commit;<br><br>insert /*+ append */<br>into rbg<br>select * from rbg;<br><br>commit;<br><br>In session 2:<br><br>select * from rbg;<br><br>Back to session 1:<br>truncate table rbg;<br><br>Back to session 2:<br><br>
PUBLIC&nbsp;&nbsp;&nbsp;&nbsp; /588bb8e2_ObjectStreamField&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30790<br>SYNONYM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 08/14/2006 14:37:42 04/13/2007 17:59:12 2006-08-14:14:37:42 VALID&nbsp;&nbsp; N N N<br><br>ERROR:<br>ORA-08103: object no longer exists
<br><br>22700 rows selected.<br><br>This is on <a href="http://10.2.0.3">10.2.0.3</a><br><br><br>-- <br>Jared Still<br>Certifiable Oracle DBA and Part Time Perl Evangelist<br>

------=_Part_28956_24718862.1198174513961--
--
http://www.freelists.org/webpage/oracle-l


