Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id EFBE31337B64 for ; Tue, 26 Oct 2010 18:03:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 44934-05 for ; Tue, 26 Oct 2010 21:02:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lpo-relay-04.vmsinfo.com (lpo-relay-04.vmsinfo.com [216.169.137.115]) by mail.postgresql.org (Postfix) with ESMTP id C9E7A1337B55 for ; Tue, 26 Oct 2010 18:02:58 -0300 (ADT) X-IronPort-AV: E=Sophos;i="4.58,242,1286164800"; d="scan'208";a="26521255" Received: from unknown (HELO lpo-mailbox-02.vmsinfo.com) ([216.169.137.251]) by lpo-relay-04.vmsinfo.com with ESMTP; 26 Oct 2010 17:02:56 -0400 Received: from [10.101.43.35] (lpo-autonomy-p03.vmsinfo.com [216.169.135.234]) by lpo-mailbox-02.vmsinfo.com (Postfix) with ESMTP id DC54156236 for ; Tue, 26 Oct 2010 17:02:55 -0400 (EDT) Message-ID: <4CC741FF.8050709@vmsinfo.com> Date: Tue, 26 Oct 2010 17:02:55 -0400 From: Mladen Gogala User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101013 Lightning/1.0b2 Thunderbird/3.1.5 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Postgres insert performance and storage requirement compared to Oracle References: <402913.53404.qm@web65405.mail.ac4.yahoo.com> <208728.42197.qm@web65409.mail.ac4.yahoo.com> <770715.39613.qm@web29003.mail.ird.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/442 X-Sequence-Number: 40860 On 10/26/2010 11:41 AM, Merlin Moncure wrote: > yup, that's exactly what I mean -- this will give you more uniform > insert performance (your temp table doesn't even need indexes). Every > N records (say 10000) you send to permanent and truncate the temp > table. Obviously, this is more fragile approach so weigh the > pros/cons carefully. > > merlin Truncate temporary table? What a horrible advice! All that you need is the temporary table to delete rows on commit. -- Mladen Gogala Sr. Oracle DBA 1500 Broadway New York, NY 10036 (212) 329-5251 http://www.vmsinfo.com The Leader in Integrated Media Intelligence Solutions