Using the COPY command:
http://techdocs.postgresql.org/techdocs/usingcopy.php
http://www.postgresql.com/docs/7.4/static/sql-copy.html
Using the COPY API:
http://www.postgresql.com/docs/7.4/static/libpq-copy.html
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of
> wespvp@syntegra.com
> Sent: Tuesday, June 29, 2004 4:02 PM
> To: Simon Windsor; Postgres List
> Subject: Re: [GENERAL] Postgres tuning?
>
>
> On 6/29/04 4:30 PM, "Simon Windsor"
> <simon.windsor@cornfield.org.uk> wrote:
>
> > I am in the process of converting a small multi-user
> application from
> > MySQL, and most queries are performing better. The only noticeable
> > exception is a batch load, which is half the speed of MySQL version.
>
> If you're talking about loading up and array and telling it
> to load the array with a single INSERT, you can't do that.
> You have to insert a record at a time. I wish it were
> possible - I could really use it.
>
> The closest thing is COPY. I've been told COPY does such a
> bulk load. The down side of COPY is that you have to know
> the column order - ok for initial loads, but dangerous for
> application usage.
>
> > begin;
> > insert into ... (repeat a few thousand to million times) commit;
>
> This does not accomplish the bulk load - it only makes all of
> the inserts part of a single transaction for atomic commit or
> rollback.
>
> Wes
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo@postgresql.org)
>