Return-Path: <oracle-l-bounce@freelists.org>
Delivered-To: 2-oracle-l@orafaq.com
Received: (qmail 20945 invoked from network); 15 Sep 2007 16:50:31 -0500
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by 69.64.49.119 with SMTP; 15 Sep 2007 16:50:31 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 122EA7443E0;
 Sat, 15 Sep 2007 17:11:48 -0400 (EDT)
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 13604-03-11; Sat, 15 Sep 2007 17:11:47 -0400 (EDT)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 60785744381;
 Sat, 15 Sep 2007 17:11:47 -0400 (EDT)
Received: with ECARTIS (v1.0.0; list oracle-l); Sat, 15 Sep 2007 16:26:46 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 8B4B7744AFC
 for <oracle-l@freelists.org>; Sat, 15 Sep 2007 16:26:46 -0400 (EDT)
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 19933-04-15 for <oracle-l@freelists.org>;
 Sat, 15 Sep 2007 16:26:46 -0400 (EDT)
Received: from web801.biz.mail.mud.yahoo.com (web801.biz.mail.mud.yahoo.com [209.191.90.74])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with SMTP id 4E6E9744AF4
 for <oracle-l@freelists.org>; Sat, 15 Sep 2007 16:26:45 -0400 (EDT)
Received: (qmail 44617 invoked by uid 60001); 15 Sep 2007 21:05:28 -0000
X-YMail-OSG: NYaRWgAVM1mSCwCJ3IpTLnyNkWg_wX4BAk5iokPVJt0P5rTmIegxlBGB9c_MX4WLQ2s9sA--
Received: from [66.193.86.210] by web801.biz.mail.mud.yahoo.com via HTTP; Sat, 15 Sep 2007 14:05:28 PDT
Date: Sat, 15 Sep 2007 14:05:28 -0700 (PDT)
From: David Aldridge <david@david-aldridge.com>
Subject: Re: Causes of CF (Control file) Enqueues on Index Creation?
To: alberto.dellera@gmail.com
Cc: T.Koppelaars@centraal.boekhuis.nl, Oracle List <oracle-l@freelists.org>
In-Reply-To: <4ef2fbf50709150315l6f7bfdb8v97e35662a00f4ea0@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1811778295-1189890328=:41968"
Message-ID: <892015.41968.qm@web801.biz.mail.mud.yahoo.com>
X-archive-position: 1601
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: david@david-aldridge.com
Precedence: normal
Reply-to: david@david-aldridge.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
--0-1811778295-1189890328=:41968
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Ah, that's very interesting. I can't imagine why the parallel dml would lock the table though.
  
Alberto Dell'Era <alberto.dellera@gmail.com> wrote:
  On 9/15/07, David Aldridge wrote:
> There's a fresh complication on this -- there are actually eight
> simultaneous processes inserting into the table, so changing to a direct
> path insert causes a big table locking problem.

An insert /*+ append */ in a partitioned table acquires a mode 6 lock on
each partition, even if you insert in only one partition (the process first
locks all partitions, then starts inserting). See attached test case (9.2.0.8):

SID TYPE NAME LMODE REQUEST
---------- ------ ------------------------------ ---------- ----------
11 TM TABLE PARTITION T P0 6 0
11 TM TABLE PARTITION T P1 6 0
11 TM TABLE T 3 0

If you can make each process insert in its own partition, a simple fix
is to specify the partition explicitly:
insert /*+ append */ into t partition (Pk) ... select ...
In this case, only Pk is locked exclusively and you can insert
simultaneously from the eight sessions (see test case, uncomment
the "partition (...)" clauses if you want to check it yourself ;)

HTH
Alberto
-- 
Alberto Dell'Era
"the more you know, the faster you go"


--0-1811778295-1189890328=:41968
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div>Ah, that's very interesting. I can't imagine why the parallel dml would lock the table though.</div>  <div><BR><B><I>Alberto Dell'Era &lt;alberto.dellera@gmail.com&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">On 9/15/07, David Aldridge <DAVID@DAVID-ALDRIDGE.COM>wrote:<BR>&gt; There's a fresh complication on this -- there are actually eight<BR>&gt; simultaneous processes inserting into the table, so changing to a direct<BR>&gt; path insert causes a big table locking problem.<BR><BR>An insert /*+ append */ in a partitioned table acquires a mode 6 lock on<BR>each partition, even if you insert in only one partition (the process first<BR>locks all partitions, then starts inserting). See attached test case (9.2.0.8):<BR><BR>SID TYPE NAME LMODE REQUEST<BR>---------- ------ ------------------------------ ---------- ----------<BR>11 TM TABLE PARTITION T P0 6 0<BR>11 TM TABLE PARTITION T P1 6
 0<BR>11 TM TABLE T 3 0<BR><BR>If you can make each process insert in its own partition, a simple fix<BR>is to specify the partition explicitly:<BR>insert /*+ append */ into t partition (Pk) ... select ...<BR>In this case, only Pk is locked exclusively and you can insert<BR>simultaneously from the eight sessions (see test case, uncomment<BR>the "partition (...)" clauses if you want to check it yourself ;)<BR><BR>HTH<BR>Alberto<BR>-- <BR>Alberto Dell'Era<BR>"the more you know, the faster you go"<BR></BLOCKQUOTE><BR>
--0-1811778295-1189890328=:41968--
--
http://www.freelists.org/webpage/oracle-l


