Re: Postgresql INSERT speed (how to improve performance)?

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Lim Berger <straightfwd007(at)gmail(dot)com>
Cc: Postgresql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql INSERT speed (how to improve performance)?
Date: 2007-08-14 12:14:10
Message-ID: CBDB6531-EA69-4A15-88C7-C04A570AFBCD@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 13, 2007, at 11:54 PM, Lim Berger wrote:

> I am testing through PHP microtime function. The query is administered
> through pg_query() function of PHP. I know there could be some latency
> coming in from the PHP's PG functions' overhead, but not such an order
> of magnitude different from "mysqli_query"! (I hope -- because this
> is quite a common real-world situation I would think).

You might also try using prepared statements for your inserts (see
PHP's pg_prepare and pg_execute functions). This will also save time
you are likely using to escape the inserted strings.

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Trutwin 2007-08-14 12:50:21 Re: Persistent connections in PHP
Previous Message Kuriakose, Cinu Cheriyamoozhiyil 2007-08-14 11:22:29 Downloading PostgreSQL source code version 7.1 through CVS