Re: Monitoring query plan cache

Поиск
Список
Период
Сортировка
От Jan de Visser
Тема Re: Monitoring query plan cache
Дата
Msg-id 2099551.ZaDQaSW763@capybara
обсуждение исходный текст
Ответ на Re: Monitoring query plan cache  (Andomar <andomar@aule.net>)
Список pgsql-general
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




В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: pg_dump
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Monitoring query plan cache