Re: PHP SQL

From: Shaun Clements <ShaunC(at)relyant(dot)co(dot)za>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Cc: 'Michael Fuhr' <mike(at)fuhr(dot)org>
Subject: Re: PHP SQL
Date: 2005-03-22 12:18:42
Message-ID: 100F78F2B203444BB161BBA7077FF6131CD960@srldbexc003.relyant.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Excellent idea. Yes, I would prefer to write in plpgsql.
My next concern then, is, does Postgres, perform some kind of Load
Balancing.
I dont want the stored procedure once run, to DOS other users, who are
running reports.. or perform queries using some application.
The reason for asking, is I plan on taking, 350 000 rows, and transforming
them, into hopefully about 50% smaller number (in a new schema)
It is critical, that I dont DOS the database server, because it is being
used in a PRODUCTION enviroment

Kind Regards,
Shaun Clements

-----Original Message-----
From: Michael Fuhr [mailto:mike(at)fuhr(dot)org]
Sent: 22 March 2005 02:01 PM
To: Shaun Clements
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] PHP SQL

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/

Responses

  • Re: PHP SQL at 2005-03-22 15:43:59 from Richard Huxton

Browse pgsql-general by date

  From Date Subject
Next Message Shachar Shemesh 2005-03-22 12:21:20 Version 1.0.0.19 of OLE DB released
Previous Message Rajarshi Mukherjee 2005-03-22 12:17:48 Re: grant problem