Re: inserting many rows - Mailing list pgsql-general

From John DeSoi
Subject Re: inserting many rows
Date
Msg-id 1AEE9C02-3352-47F4-AC1D-D80F71E53736@pgedit.com
Whole thread Raw
In response to inserting many rows  (SunWuKung <Balazs.Klein@axelero.hu>)
List pgsql-general
On Jan 2, 2006, at 5:34 PM, SunWuKung wrote:

> What do you suggest is the most effective way to insert this type of
> data into the db? Issuing multiple inserts from php seems to be a
> waste
> of resources.
>
> I was thinking of writing the responses into a pg array field with a
> single insert and than explode the content of that field into rows
> with
> a function.

This may help. But other than using some form of COPY, you'll
probably get the best performance increase using prepared statements.
Unfortunately, I think this is only available in PHP 5.1 and later.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


pgsql-general by date:

Previous
From: Michelle Konzack
Date:
Subject: create summaries and update a second table?
Next
From: Michelle Konzack
Date:
Subject: "REFERENCES" and UNIQUE