Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B49F2133655C for ; Wed, 27 Oct 2010 15:51:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 90408-08 for ; Wed, 27 Oct 2010 18:51:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outbound.afilias.info (outbound.afilias.info [69.46.124.26]) by mail.postgresql.org (Postfix) with ESMTP id 16646133616B for ; Wed, 27 Oct 2010 15:51:05 -0300 (ADT) Received: from ms5.yyz2.afilias-ops.info ([10.50.129.111] helo=smtp.afilias.info) by outbound.afilias.info with esmtp (Exim 4.69) (envelope-from ) id 1PBB5T-0003Ov-3Z; Wed, 27 Oct 2010 18:51:03 +0000 Received: from tor-gateway.afilias.info ([199.15.87.4] helo=[10.10.46.23]) by smtp.afilias.info with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1PBB5S-0002cW-6I; Wed, 27 Oct 2010 18:51:02 +0000 Message-ID: <4CC87496.9070703@ca.afilias.info> Date: Wed, 27 Oct 2010 14:51:02 -0400 From: Steve Singer User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: Divakar Singh CC: Merlin Moncure , Robert Haas , Mladen Gogala , 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> <4CC741FF.8050709@vmsinfo.com> <4CC74E31.6060307@vmsinfo.com> <252538.42200.qm@web65405.mail.ac4.yahoo.com> <173298.80592.qm@web65406.mail.ac4.yahoo.com> In-Reply-To: <173298.80592.qm@web65406.mail.ac4.yahoo.com> 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=-3.895 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SARE_MILLIONSOF=0.315, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/496 X-Sequence-Number: 40914 On 10-10-27 02:14 PM, Divakar Singh wrote: > yes this is a very clearly visible problem. > The difference b/w oracle and PG increases with more rows. > when oracle takes 3 GB, PG takes around 6 GB. > I only use varchar. > I will try to use your tips on "smart table layout, toast compression". > Assuming these suggested options do not have any performance penalty? > Best Regards, > Divakar In between test runs are you cleaning out the tables with a "DELETE FROM aaaaa" or are you using the TRUNCATE command? Or dropping the table and recreating it. If your just using DELETE it might be that disk space is still being used by the old versions of the rows. Also is postgresql using more space than oracle for storing the index data or the main table data? and is any particular index larger on postgresql compared to Oracle. > > > ------------------------------------------------------------------------ > *From:* Merlin Moncure > *To:* Divakar Singh > *Cc:* Robert Haas ; Mladen Gogala > ; pgsql-performance@postgresql.org > *Sent:* Wed, October 27, 2010 11:36:00 PM > *Subject:* Re: [PERFORM] Postgres insert performance and storage > requirement compared to Oracle > > On Tue, Oct 26, 2010 at 11:10 PM, Divakar Singh > wrote: > > Dear All, > > Thanks for your inputs on the insert performance part. > > Any suggestion on storage requirement? > > VACUUM is certainly not an option, because this is something related to > > maintenance AFTER insertion. > > I am talking about the plain storage requirement w.r. to Oracle, which I > > observed is twice of Oracle in case millions of rows are inserted. > > Anybody who tried to analyze the average storage requirement of PG > w.r. to > > Oracle? > > There isn't much you can to about storage use other than avoid stupid > things (like using char() vs varchar()), smart table layout, toast > compression, etc. Are you sure this is a problem? > > merlin >