Search Postgresql Archives

Re: Monitoring query plan cache

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

 



On December 21, 2014 04:08:43 PM Andomar wrote:
> It is not always easy to tell the query type (function, prepared or 
> ad-hoc.) We use Python in mod_wsgi with psycopg2. The code shows ad-hoc 
> SQL, but who knows what the many layers between Python and the database do.

psycopg2 sends the SQL you feed it straight to the DB. If you don't feed it a 
PREPARE statement [1] it'll be an ad-hoc query; the value placeholders will be 
interpolated prior to statement submission by psycopg2. 


[1] http://www.postgresql.org/docs/9.2/interactive/sql-prepare.html




-- 
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