Return-Path: <oracle-l-bounce@freelists.org>
Delivered-To: 2-oracle-l@orafaq.com
Received: (qmail 18119 invoked from network); 23 Jan 2008 07:09:13 -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; 23 Jan 2008 07:09:11 -0600
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 363CF7EBB88;
 Wed, 23 Jan 2008 08:09:09 -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 22640-10; Wed, 23 Jan 2008 08:09:09 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A5BD67EBCD1;
 Wed, 23 Jan 2008 08:09:08 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 23 Jan 2008 08:06:58 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 1467D7EB11F
 for <oracle-l@freelists.org>; Wed, 23 Jan 2008 08:06:58 -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 21809-04 for <oracle-l@freelists.org>;
 Wed, 23 Jan 2008 08:06:58 -0500 (EST)
Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id C023C7EAEC1
 for <oracle-l@freelists.org>; Wed, 23 Jan 2008 08:06:57 -0500 (EST)
Received: by wa-out-1112.google.com with SMTP id k22so5416968waf.18
        for <oracle-l@freelists.org>; Wed, 23 Jan 2008 05:06:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:from:to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-mailer:in-reply-to:x-mimeole:thread-index;
        bh=m0kK9CwfFn0gXGzcvNtrF+O5ibPnQuHsfJTNLomzYoA=;
        b=h+O9Dg89hBiubTe0gp2YGozY54XY+ZTlVoCLW2Rx7WeTVz4AUPuN43kK2pK44797Z5NqN7s3mgGazZoq9DLhJL56BCQ03rhz1NXS4AK9Kcn5kO+/FdFgjZLVW64+qSRNFSPQtrk4WqnAkKdLYxLKhMxVqXboN9D2tToSWKH4AXE=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=from:to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-mailer:in-reply-to:x-mimeole:thread-index;
        b=WLieUynZk+mcpqcCCM4TFP8+JRf6izw8mZl70HziOwKfGfWkcvlcIGUUnqmBYGfbO+ACTWeimc8irPWbTOdf5Fm+J2UKZhPtyxAvcviDkqkpEJyBBRynBaGLOgCxL5eAk4RIKEUmju0AlAeUhQow9Bak3qjvtF8P0fV8+feES/A=
Received: by 10.114.93.17 with SMTP id q17mr8075918wab.70.1201093616780;
        Wed, 23 Jan 2008 05:06:56 -0800 (PST)
Received: from dell600m ( [203.59.91.233])
        by mx.google.com with ESMTPS id q18sm16003482pog.12.2008.01.23.05.06.52
        (version=SSLv3 cipher=RC4-MD5);
        Wed, 23 Jan 2008 05:06:54 -0800 (PST)
From: "Connor McDonald" <mcdonald.connor@gmail.com>
To: <oracle-l@freelists.org>
Subject: RE: Paralellizing Pl/sql inserts
Date: Wed, 23 Jan 2008 22:06:51 +0900
Message-ID: <004e01c85dc0$d4353560$0b00a8c0@dell600m>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
In-Reply-To: <901CE9A27473416CABACB807651DE527@KenPC>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-archive-position: 4865
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: mcdonald.connor@gmail.com
Precedence: normal
Reply-to: mcdonald.connor@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


-----Original Message-----
From: oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org]
On Behalf Of Ken Naim
Sent: Wednesday, 23 January 2008 9:04 AM
To: oracle-l@freelists.org
Subject: Paralellizing Pl/sql inserts


I have a process that is currently running at a rate of 4 million inserts
per hour. In selects from a cursor that returns 65 million records bulk
collects 500 at a time and forall inserts them into another table with 1.5
billion rows. I cannot do an insert as select as the record may already
exists. I use the save exceptions clause to allow the code to continue
processing but I don't care about which record turn the unique constraint
violation. The 1.2 billion row table is partitioned but the data can go into
any partition. The 65 million row table is not partitioned

<snip>

I am open to any suggestions but my question is how can I parallelize the
process into multiple (24-48) threads.

Thanks,
Ken 

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


Some things to possibly consider:

- Use SQL and LOG ERRORS clause to catch your exceptions
- Why "insert-select-where-not-exists" to avoid your duplicates
- Are your indexes global or local ?  If local, you might get some nice
parallelism by selecting from your 65mill table rows based on the partition
they will end up in, and then hammer against multiple partitions in parallel

hth
connor

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


