Re: inserting many rows

From: John DeSoi <desoi(at)pgedit(dot)com>
To: SunWuKung <Balazs(dot)Klein(at)axelero(dot)hu>
Cc: Postgresql-General General <pgsql-general(at)postgresql(dot)org>
Subject: Re: inserting many rows
Date: 2006-01-04 18:51:07
Message-ID: 1AEE9C02-3352-47F4-AC1D-D80F71E53736@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michelle Konzack 2006-01-04 18:52:43 "REFERENCES" and UNIQUE
Previous Message Robert Osowiecki 2006-01-04 18:50:59 Re: Unique transaction ID