Received: from smtp.attica.net.nz (mail.attica.net.nz [202.180.64.33]) by postgresql.org (8.11.3/8.11.1) with SMTP id f373Zb820582 for ; Fri, 6 Apr 2001 23:35:37 -0400 (EDT) (envelope-from markir@i4free.co.nz) Received: (qmail 31318 invoked from network); 7 Apr 2001 03:35:15 -0000 Received: from unknown (HELO spikey.slithery.org) (202.180.89.181) by mail.attica.net.nz with SMTP; 7 Apr 2001 03:35:15 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Mark Kirkwood To: Richard Huxton , edipoelder@ig.com.br Subject: Memory And Performance Date: Sat, 7 Apr 2001 15:31:04 +1200 X-Mailer: KMail [version 1.2] Cc: pgsql-sql@postgresql.org MIME-Version: 1.0 Message-Id: <01040715310400.00651@spikey.slithery.org> Content-Transfer-Encoding: 8bit X-Archive-Number: 200104/101 X-Sequence-Number: 2441 > > The system that I'm developing, I have about 25000 (persons) x 8 >>(exams) >> x 15 (answers per exam) = 3000000 records to process and it is VERY SLOW. > >f you need to import large quantities of data, look at the copy >command, that tends to be faster. By way of example for the level of improvement COPY gives: a 3000000 row table ( 350Mb dump file -> 450Mb table ) can by loaded via copy in 7 minutes. To insert each row (say using a perl prog to read the file and DBD-Pg to insert, committing every 10000 rows ) takes about 75minutes. I used a PII 266Mhz/192Mb and Postgresql 7.1b5 for these results. Postgresql 7.0.2 is slower ( 20-30% or so...), but should still display a similar level of improvement with copy. Good loading Mark