Re: Importing into Postgres from a csv file - Mailing list pgsql-general

From Roderick A. Anderson
Subject Re: Importing into Postgres from a csv file
Date
Msg-id Pine.LNX.4.04.10008240857481.29855-100000@asgard.altoplanos.net
Whole thread Raw
In response to Re: Importing into Postgres from a csv file  (John McKown <jmckown@prodigy.net>)
Responses Re: Importing into Postgres from a csv file  (John McKown <jmckown@prodigy.net>)
List pgsql-general
On Thu, 24 Aug 2000, John McKown wrote:

> I think that you can do this using the COPY verb in psql.
>
> COPY table FROM file USING DELIMITERS ',';

Be aware you will probably have to start psql as the postgres (superuser)
to use the COPY command.

But ... the \copy version is usable by normal users.


Spent the best part of this morning playing with it.  Testing - stress
testing - my system and PostgreSQL.  Importing 187 files of approx.
150,000 records with 4 fields (float4, float4, float4, interger).

Was taking about 8 seconds per file on a PII/350 w/ 256 MByte RAM.

Hope my partition survives the process (system's at home) since it was
only 2 GByte with 1% used.

Rod
--
Roderick A. Anderson
raanders@altoplanos.net               Altoplanos Information Systems, Inc.
Voice: 208.765.6149                            212 S. 11th Street, Suite 5
FAX: 208.664.5299                                  Coeur d'Alene, ID 83814


pgsql-general by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: FW: Count & Distinct
Next
From: "Ryan Williams"
Date:
Subject: Re: FW: Count & Distinct