Re: PHP SQL

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Shaun Clements <ShaunC(at)relyant(dot)co(dot)za>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PHP SQL
Date: 2005-03-22 12:00:49
Message-ID: 20050322120049.GA47777@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

  • PHP SQL at 2005-03-22 11:25:30 from Shaun Clements

Browse pgsql-general by date

  From Date Subject
Next Message Rajarshi Mukherjee 2005-03-22 12:17:48 Re: grant problem
Previous Message Rajarshi Mukherjee 2005-03-22 11:57:25 grant problem