Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D61AF2E0035 for ; Sat, 26 Apr 2008 22:14:58 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 17827-09 for ; Sat, 26 Apr 2008 22:14:55 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by developer.postgresql.org (Postfix) with ESMTP id C91B82E0033 for ; Sat, 26 Apr 2008 22:14:55 -0300 (ADT) Received: by yw-out-2324.google.com with SMTP id 5so849090ywb.73 for ; Sat, 26 Apr 2008 18:14:54 -0700 (PDT) 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:content-transfer-encoding:content-disposition:references; bh=m6C1K5M/XSDJau55MwEk13iyMT63WstIaFlL7YSzUYs=; b=fZoACQMlBbJbsq/gpGvmTVRyuoE686nTYDYKYYmETSubLO0asLiKXJlBt4rYWvASWWg1mru9gYoiaNRgBT+byDaZRZZk2vUDGu1XtubjuXjRBrcZoTBh/RNw2iU79viI3yEcEIExBzT88z9L3y6IDZlMvSCxOJyU+jR+anhEH0o= 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:content-transfer-encoding:content-disposition:references; b=Bc3dleDbiKim0dCwqoRx5DyhtNo2zP4lXWVdDgAYH9Je+YTDg3QuHOHuO5iCbXG7G8B/KaL0Ihaxgvu9HJ7fVHSq/FWHj0aTMX5tgtNUowJi5ZpQQ/XGGmOuYyQNUFMVc3ZllQJ4C8WC21JcbDQdTBptphrDnGm26+XDsymafJU= Received: by 10.150.79.32 with SMTP id c32mr2277840ybb.154.1209258893626; Sat, 26 Apr 2008 18:14:53 -0700 (PDT) Received: by 10.150.58.20 with HTTP; Sat, 26 Apr 2008 18:14:53 -0700 (PDT) Message-ID: <36e682920804261814w3508b232n6cf935874b19bf31@mail.gmail.com> Date: Sat, 26 Apr 2008 21:14:53 -0400 From: "Jonah H. Harris" To: "Adonias Malosso" Subject: Re: Best practice to load a huge table from ORACLE to PG Cc: pgsql-performance@postgresql.org In-Reply-To: <8a5d3c890804260625o7ad0700fp79f951c58c242720@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <8a5d3c890804260625o7ad0700fp79f951c58c242720@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/380 X-Sequence-Number: 29873 On Sat, Apr 26, 2008 at 9:25 AM, Adonias Malosso wrote: > I=B4d like to know what=B4s the best practice to LOAD a 70 milion rows, 1= 01 > columns table > from ORACLE to PGSQL. The fastest and easiest method would be to dump the data from Oracle into CSV/delimited format using something like ociuldr (http://www.anysql.net/en/ociuldr.html) and load it back into PG using pg_bulkload (which is a helluva lot faster than COPY). Of course, you could try other things as well... such as setting up generic connectivity to PG and inserting the data to a PG table over the database link. Similarly, while I hate to see shameless self-plugs in the community, the *fastest* method you could use is dblink_ora_copy, contained in EnterpriseDB's PG+ Advanced Server; it uses an optimized OCI connection to COPY the data directly from Oracle into Postgres, which also saves you the intermediate step of dumping the data. --=20 Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com Edison, NJ 08837 | http://www.enterprisedb.com/