Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 1760A1337B56 for ; Mon, 25 Oct 2010 15:56:23 -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 96881-05 for ; Mon, 25 Oct 2010 18:56:16 +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 4E5BD1337999 for ; Mon, 25 Oct 2010 15:56:15 -0300 (ADT) X-IronPort-AV: E=Sophos;i="4.58,237,1286164800"; d="scan'208";a="26494827" Received: from unknown (HELO lpo-mailbox-01.vmsinfo.com) ([216.169.137.251]) by lpo-relay-04.vmsinfo.com with ESMTP; 25 Oct 2010 14:56:14 -0400 Received: from [10.101.43.35] (unknown [216.169.135.235]) by lpo-mailbox-01.vmsinfo.com (Postfix) with ESMTP id 408E47D00B; Mon, 25 Oct 2010 14:56:14 -0400 (EDT) Message-ID: <4CC5D2CD.40403@vmsinfo.com> Date: Mon, 25 Oct 2010 14:56:13 -0400 From: Mladen Gogala Organization: VMS User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: Divakar Singh CC: Scott Marlowe , "pgsql-performance@postgresql.org" Subject: Re: Postgres insert performance and storage requirement compared to Oracle References: <402913.53404.qm@web65405.mail.ac4.yahoo.com> <781874.42830.qm@web65413.mail.ac4.yahoo.com> In-Reply-To: <781874.42830.qm@web65413.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=-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/408 X-Sequence-Number: 40826 Profiling could tell you where is the time lost and where is your program spending time. Having experience with both Oracle and Postgres, I don't feel that there is much of a difference in the insert speed. I am not using C++, I am using scripting languages like Perl and PHP and, as far as inserts go, I don't see much of a difference. I have an application which inserts approximately 600,000 records into a PostgreSQL 9.0.1 per day, in chunks of up to 60,000 records every hour. The table is partitioned and there are indexes on the underlying partitions. I haven't noticed any problems with inserts. Also, if I use "copy" instead of the "insert" command, I can be even faster. In addition to that, PostgreSQL doesn't support index organized tables. Divakar Singh wrote: > Storage test was simple, but the data (seconds taken) for INSERT test > for PG vs Oracle for 1, 2, 3,4 and 5 indexes was: > PG: > 25 > 30 > 37 > 42 > 45 > > > > Oracle: > > 33 > 43 > 50 > 65 > 68 > > Rows inserted: 100,000 > Above results show good INSERT performance of PG when using SQL > procedures. But performance when I use C++ lib is very bad. I did that > test some time back so I do not have data for that right now. > > ------------------------------------------------------------------------ > *From:* Scott Marlowe > *To:* Divakar Singh > *Cc:* pgsql-performance@postgresql.org > *Sent:* Mon, October 25, 2010 11:56:27 PM > *Subject:* Re: [PERFORM] Postgres insert performance and storage > requirement compared to Oracle > > On Mon, Oct 25, 2010 at 12:12 PM, Divakar Singh > wrote: > > Hello Experts, > > My application uses Oracle DB, and makes use of OCI interface. > > I have been able to develop similar interface using postgreSQL library. > > However, I have done some tests but results for PostgreSQL have not been > > encouraging for a few of them. > > Tell us more about your tests and results please. > -- 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