Received: from smtp017.mail.yahoo.com (smtp017.mail.yahoo.com [216.136.174.114]) by postgresql.org (8.11.3/8.11.4) with SMTP id fBK0t6m34359 for ; Wed, 19 Dec 2001 19:55:07 -0500 (EST) (envelope-from chrup999@yahoo.com) Received: from chill-025.dfw.tx.bbnow.net (HELO ?192.168.0.6?) (24.219.2.25) by smtp.mail.vip.sc5.yahoo.com with SMTP; 20 Dec 2001 00:55:09 -0000 Mime-Version: 1.0 X-Sender: chrup999@pop.mail.yahoo.com Message-Id: In-Reply-To: <5511D658682A7740BA295CCF1E1233A635A81E@VSVAPOSTAL2.prod.netsol.com> References: <5511D658682A7740BA295CCF1E1233A635A81E@VSVAPOSTAL2.prod.netsol.com> Date: Wed, 19 Dec 2001 18:55:06 -0600 To: "Zhang, Anna" From: Chris Ruprecht Subject: Re: poor performance of loading data Cc: "'pgsql-admin@postgresql.org'" Content-Type: text/plain; charset="iso-8859-1" ; format="flowed" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id fBK1AJn34921 X-Archive-Number: 200112/136 X-Sequence-Number: 2859 Anna, At 12:57 -0500 12/19/2001, Zhang, Anna wrote: >I just installed Postgres 7.1.3 on my Red Hat 7.2 linux box. We are doing >research to see how postgres doing, I used copy utility to import data from >a text file which contains 32 mils rows, it has been 26 hours passed, but >still running. My question is how postgres handles such data loading? it >commited every row? or commit point is adjustable? How? Does postgres >provide direct load to disk files like oracle? Other ways to speed up? If >loading performance can't be improved significantly, we have to go back to >oracle. Anybody can help? Thanks! Did you edit the PostGreSQL startup parameters? if not, you have a very sluggish system. You should have an ample supply of shared memory (2000 - 8000 blocks of 8K each). Also, do you have an index defined on your table? If so, drop the index, load the records, then, re-create the index(es) for the table. Speed will improve tremendously for copy commands with no index to update. creating an index for all 32M records is much faster than having to insert index values. You might find your file loaded in a fraction of the time is has used already with these optimizations applied. Without knowing more specifics, this is all I can recommend. Best regards, Chris -- Chris Ruprecht Network grunt and bit pusher extraordinaíre _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com