Search Postgresql Archives

Re: Preparing statement using PQexec vs PQprepare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 19, 2015 at 5:55 AM, tonymark09 <tonymark09@xxxxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux