Skip site navigation (1) Skip section navigation (2)

Re: performance for high-volume log insertion

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 (view raw or flat)
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

In response to

Responses

pgsql-performance by date

Next:From: davidDate: 2009-04-23 04:56:51
Subject: Re: performance for high-volume log insertion
Previous:From: Stephen FrostDate: 2009-04-23 01:50:36
Subject: Re: performance for high-volume log insertion

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group