Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 858149FB308 for ; Fri, 13 Oct 2006 02:13:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 76544-04 for ; Fri, 13 Oct 2006 05:13:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web50806.mail.yahoo.com (web50806.mail.yahoo.com [206.190.38.115]) by postgresql.org (Postfix) with SMTP id C37A79FB2C0 for ; Fri, 13 Oct 2006 02:13:50 -0300 (ADT) Received: (qmail 65147 invoked by uid 60001); 13 Oct 2006 05:13:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=B8UPpMNURVBLfJrMHy6kBuIaLJ/UyiHI9V04NO2YAzPS7jWSlBJnbLtHkFCe5mpu7GNHVvuHCmS0Oz1ZkcDxxcCsciZLXeW51o4cwa3vJ8iW3ebCi3H6Q2zsSfOPYIDUR7kVHB+8WbYuCwH+WQY+/X0frV6c1WPPBHWgwCOgc6k= ; Message-ID: <20061013051348.65145.qmail@web50806.mail.yahoo.com> Received: from [203.134.174.70] by web50806.mail.yahoo.com via HTTP; Thu, 12 Oct 2006 22:13:48 PDT Date: Thu, 12 Oct 2006 22:13:48 -0700 (PDT) From: roopa perumalraja Subject: Performance problem To: pgsql-general@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-357178597-1160716428=:64952" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.356 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, HTML_MESSAGE X-Spam-Level: *** X-Archive-Number: 200610/636 X-Sequence-Number: 102162 --0-357178597-1160716428=:64952 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I am new to postgres and I have 4 doubts. 1) I have a performance problem as I am trying to insert around 60 million rows to a table which is partitioned. So first I copied the .csv file which contains data, with COPY command to a temp table which was quick. It took only 15 to 20 minutes. Now I am inserting data from temp table to original table using insert into org_table (select * from temp_table); which is taking more than an hour & is still inserting. Is there an easy way to do this? 2) I want to increase the performance of database as I find it very slow which has more than 60 million rows in one table. I increased the shared_buffer parameter in postgres.conf file to 20000 but that does help much. 3) I have partitioned a parent table into 100 child tables so when I insert data to parent table, it automatically inserts to child table. I have followed http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html. When I did this, I noticed that when I viewed data of parent table, it had the rows of the child table and is not empty. But the child tables do have the rows in it. I don’t understand. 4) I want to use materialized views, I don’t understand it from http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html, can anyone explain me with a simple example. Thanks in advance. Regards Roopa --------------------------------- Get your email and more, right on the new Yahoo.com --0-357178597-1160716428=:64952 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
I am new to postgres and I have 4 doubts.
 
1) I have a performance problem as I am trying to insert around 60 million rows to a table which is partitioned. So first I copied the .csv file which contains data, with COPY command to a temp table which was quick. It took only 15 to 20 minutes. Now I am inserting data from temp table to original table using insert into org_table (select * from temp_table); which is taking more than an hour & is still inserting. Is there an easy way to do this?
 
2) I want to increase the performance of database as I find it very slow which has more than 60 million rows in one table. I increased the shared_buffer parameter in postgres.conf file to 20000 but that does help much.
 
3) I have partitioned a parent table into 100 child tables so when I insert data to parent table, it automatically inserts to child table. I have followed http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html. When I did this, I noticed that when I viewed data of parent table, it had the rows of the child table and is not empty. But the child tables do have the rows in it. I don’t understand.
 
4) I want to use materialized views, I don’t understand it from http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html, can anyone explain me with a simple example.
 
Thanks in advance.
 
Roopa


Get your email and more, right on the new Yahoo.com --0-357178597-1160716428=:64952--