Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 61D2A1337B83 for ; Mon, 25 Oct 2010 15:31:32 -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 90371-04-4 for ; Mon, 25 Oct 2010 18:31:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm10-vm1.bullet.mail.ac4.yahoo.com (nm10-vm1.bullet.mail.ac4.yahoo.com [98.139.53.195]) by mail.postgresql.org (Postfix) with SMTP id AC3111337B6D for ; Mon, 25 Oct 2010 15:31:24 -0300 (ADT) Received: from [98.139.52.189] by nm10.bullet.mail.ac4.yahoo.com with NNFMP; 25 Oct 2010 18:31:23 -0000 Received: from [98.139.52.184] by tm2.bullet.mail.ac4.yahoo.com with NNFMP; 25 Oct 2010 18:31:23 -0000 Received: from [127.0.0.1] by omp1067.mail.ac4.yahoo.com with NNFMP; 25 Oct 2010 18:31:23 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 9061.76492.bm@omp1067.mail.ac4.yahoo.com Received: (qmail 20747 invoked by uid 60001); 25 Oct 2010 18:31:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1288031482; bh=4fqnYCPjIKSV1bZRVGik3QdsuOo4MI9oQiNnBmFUwTM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=HxtdI1QHQpourzMbV73R+JUEBSlf36yb5Cw7gR4QjvG5D5fDTAnuezaPPl73o35Ijt5ZqSoOvpObJtVCzhmhykBpXudOfoDej4a3T5WjfBjAAilq+6+2ppkq08BnI0Az8qSgrXTl8V4IIZR8prmtbSHKtb6AEDq8F2SKrTwnXZo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=nW9GulXOPJ+i8KWvqiQrDWqYfBaOB0hDrg2VgofVEb4NZqmPw4/2ohNqlRqp4wuM35IW6A4mzn3nu7HOwokUjzPZzDNdCqXQTqAemxpqh17F7NNeGHCYM9dsYV7OkrsCjuoEEHdNOGQjXuZKoPiznk7xcOZKU4K/raMYQadg+9E=; Message-ID: <772167.16310.qm@web65409.mail.ac4.yahoo.com> X-YMail-OSG: oT8TQ4kVM1mw9g_5CESJgZ99rLsJ7t.uDt9P4QJ4o0B49qI FtNZKx0jcFEmfk3olvO0LkMiGSPl43I_y2uZLmrxqZZzFbp4QRs7jdxEEVq9 .P6Ubr0mulWU67nEwLivjbIZRg_nkOLtfV9nhi0DOtJJLoKFCsvh2Jvs41S8 83y1oahVxPEt0k1yXmV.asYwiKKccdKIGi6ebZMtcX_FCRZ5Y5ZPLRcseQpV y_zoeAEtQWA86vsI631aU1pZkk0PMa5.xI.WlDRijKgk2V6UqXB9_nxAteCF qMSXzeR45mUu_HBy3mVHmu1whYkSNG17mZdbxjGpohm8SlKU86ffNWcZ8Rux HR2XbOXw- Received: from [194.237.142.6] by web65409.mail.ac4.yahoo.com via HTTP; Mon, 25 Oct 2010 11:31:22 PDT X-Mailer: YahooMailRC/504.5 YahooMailWebService/0.8.107.284920 References: <402913.53404.qm@web65405.mail.ac4.yahoo.com> <1288030833.8930.30.camel@jd-desktop> Date: Mon, 25 Oct 2010 11:31:22 -0700 (PDT) From: Divakar Singh Subject: Re: Postgres insert performance and storage requirement compared to Oracle To: jd@commandprompt.com Cc: pgsql-performance@postgresql.org In-Reply-To: <1288030833.8930.30.camel@jd-desktop> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1830670785-1288031482=:16310" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/400 X-Sequence-Number: 40818 --0-1830670785-1288031482=:16310 Content-Type: text/plain; charset=us-ascii > My questions/scenarios are: > > 1. How does PostgreSQL perform when inserting data into an indexed > (type: btree) > table? Is it true that as you add the indexes on a table, the > performance > deteriorates significantly whereas Oracle does not show that much > performance > decrease. I have tried almost all postgreSQL performance tips > available. I want > to have very good "insert" performance (with indexes), "select" > performance is > not that important at this point of time. -- Did you test? Yes. the performance was comparable when using SQL procedure. However, When I used libpq, PostgreSQL performed very bad. There was some difference in environment also between these 2 tests, but I am assuming libpq vs SQL was the real cause. Or it was something else? > > 2. What are the average storage requirements of postgres compared to > Oracle? I > inserted upto 1 million records. The storage requirement of postgreSQL > is almost > double than that of Oracle. -- What was your table structure? Some 10-12 columns ( like 2 timestamp, 4 int and 4 varchar), with 5 indexes on varchar and int fields including 1 implicit index coz of PK. Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt --0-1830670785-1288031482=:16310 Content-Type: text/html; charset=us-ascii

> My questions/scenarios are:
>
> 1. How does PostgreSQL perform when inserting data into an indexed
> (type: btree)
> table? Is it true that as you add the indexes on a table, the
> performance
> deteriorates significantly whereas Oracle does not show that much
> performance
> decrease. I have tried almost all postgreSQL performance tips
> available. I want
> to have very good "insert" performance (with indexes), "select"
> performance is
> not that important at this point of time.

-- Did you test?

Yes. the performance was comparable when using SQL procedure. However, When I used libpq, PostgreSQL performed very bad. There was some difference in environment also between these 2 tests, but I am assuming libpq vs SQL was the real cause. Or it was something else?
 
>
> 2. What are the average storage requirements of postgres compared to
> Oracle? I
> inserted upto 1 million records. The storage requirement of postgreSQL
> is almost
> double than that of Oracle.

 -- What was your table structure?

Some 10-12 columns ( like 2 timestamp, 4 int and 4 varchar), with 5 indexes on varchar and int fields including 1 implicit index coz of PK.


Joshua D. Drake


--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt


--0-1830670785-1288031482=:16310--