Re: Preparing statement using PQexec vs PQprepare - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Preparing statement using PQexec vs PQprepare
Date
Msg-id CAHyXU0yF3XyS4ef2ZkNE++58HwO65pwKW0DJFVF-czF3fwienA@mail.gmail.com
Whole thread Raw
In response to Preparing statement using PQexec vs PQprepare  (tonymark09 <tonymark09@gmail.com>)
List pgsql-general
On Wed, Aug 19, 2015 at 5:55 AM, tonymark09 <tonymark09@gmail.com> wrote:
> Hello,
>
> Is preparing a statement using PQexec and executing it is much slower that
> using other API such as PQprepare and PQexecPrepared?

PQexec can be faster than a combination of PQprepare and
PQexecPrepared particularly if you only need to execute the query
once, but I don't recommend using it for the most part.   If the query
is to be executed many times, or has a lot of parameters, you'll want
to use the prepared interface.

merlin


pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: PostgreSQL customer list
Next
From: Laurent Laborde
Date:
Subject: hot backup with zfs ?