Received: from mail.greatbasin.net (mail.greatbasin.net [207.228.35.39]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7OMpYf39609 for ; Fri, 24 Aug 2001 18:51:34 -0400 (EDT) (envelope-from jeremy@wellsgaming.com) Received: from [172.16.1.100] (rno-dsl0b-131.gbis.net [216.82.145.131]) by mail.greatbasin.net (8.9.3-MySQL-0.2.3b/8.9.3) with ESMTP id PAA11689; Fri, 24 Aug 2001 15:51:25 -0700 (PDT) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 Date: Fri, 24 Aug 2001 15:50:51 -0700 Subject: Re: Fast load From: Jeremy Buchmann To: Ted Rolle , "'pgsql-admin'" Message-ID: In-Reply-To: <000201c12ce6$a9d826e0$ab00a8c0@ted> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Archive-Number: 200108/110 X-Sequence-Number: 2046 > We have 73 databases, two dozen with hundreds of thousands to millions of > records, with lengths in the 500-byte range. I'm planning to convert them > from Btrieve to PostgreSQL. > > Of course, I want the highest reasonable speed so that the conversion can be > completed - say - in a week-end. > > My initial take is to create a tab-delimited file and use this as input to > the \copy command in psql. > > Another option might be to feed them directly to the back end. > > I'm a C programmer, so writing the necessary programs for the conversion and > load is not a problem. > > Any pointers? Use \copy. It's very fast at importing tab-delimited text files. Just make sure that what you export from the old database is very "clean", meaning no quotes around text fields, no tabs within a field, that sort of thing. 73 is a lot of databases, but it will probably take you more time to actually type the \copy commands than it will for postgres to copy the data. -- Jeremy [jeremy@wellsgaming.com]