Re: prepared statement: are they pre-compiled?

Поиск
Список
Период
Сортировка
От Flipper
Тема Re: prepared statement: are they pre-compiled?
Дата
Msg-id 200707051208.59443.flipper@gammadue.com
обсуждение исходный текст
Ответ на Re: prepared statement: are they pre-compiled?  (Heikki Linnakangas <heikki@enterprisedb.com>)
Ответы Re: prepared statement: are they pre-compiled?  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-jdbc
On Thursday 5 July 2007 Heikki Linnakangas's cat, walking on the keyboard,
wrote:
> It depends on the prepareThreshold parameter. The default is 5, which
> means that the query is parsed and planned separately for each call to
> executeQuery, until the 5th call. After that, a generic plan is
> generated and used thereafter.

Thanks for you explaination!
Where is this default parameter set? I cannot find it.
By the way, I cannot see the real difference in the code, and in fact the
QueryExecutor goes into the sendParse with oneShot = false (since the flag
has not been set). The sendParse creates a statement name and then sends the
parse message. So the doubt is: the parse message is always sent and the
server ignores it when a statement name is provided? Or is something in the
Java code that I'm not getting?

Thanks

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: prepared statement: are they pre-compiled?
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: prepared statement: are they pre-compiled?