From: | Glenn Maynard <glennfmaynard(at)gmail(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: performance for high-volume log insertion |
Date: | 2009-04-23 02:20:41 |
Message-ID: | bd36f99e0904221920s6cca4c31oe766d32cd8b91723@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Wed, Apr 22, 2009 at 9:48 PM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> Erm.. Prepared queries is about using PQexecPrepared(), not about
> sending a text string as an SQL EXECUTE(). PQexecPrepared takes an
> array of arguments. That gets translated into a Bind command in the
> protocol with a defined number of parameters and a length for each
> parameter being passed. That removes any need for scanning/parsing the
> string sent to the backend. That's the savings I'm referring to.
I'd suggest this be mentioned in the sql-prepare documentation, then,
because that documentation only discusses using prepared statements to
eliminate redundant planning costs. (I'm sure it's mentioned in the
API docs and elsewhere, but if it's a major intended use of PREPARE,
the PREPARE documentation should make note of it.)
--
Glenn Maynard
From | Date | Subject | |
---|---|---|---|
Next Message | david | 2009-04-23 04:56:51 | Re: performance for high-volume log insertion |
Previous Message | Stephen Frost | 2009-04-23 01:50:36 | Re: performance for high-volume log insertion |