Re: PHP SQL - Mailing list pgsql-general

From Michael Fuhr
Subject Re: PHP SQL
Date
Msg-id 20050322120049.GA47777@winnie.fuhr.org
Whole thread Raw
In response to PHP SQL  (Shaun Clements <ShaunC@relyant.co.za>)
List pgsql-general
On Tue, Mar 22, 2005 at 01:25:30PM +0200, Shaun Clements wrote:

> Which is more efficient, in reading in a row of data, and assigning
> individual column values to variables, and then inserting a new row into the
> new table.
>
> pg_fetch_row
> pg_fetch_assoc
> pg_fetch_object
> pg_fetch_result
> pg_fetch_array
>
> Are there performance differences, which are noticeable?

The best way to determine this would be to benchmark each method
in your own environment and observe whether there are significant
differences.

Have you considered using a server-side function to avoid passing
the data back and forth between the client and the server?  Are you
familiar with constructs like CREATE TABLE AS and INSERT...SELECT?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Rajarshi Mukherjee
Date:
Subject: grant problem
Next
From: Bruno Wolff III
Date:
Subject: Re: grant problem