Re: Under what circumstances does PreparedStatement use stored plans?
В списке pgsql-jdbc по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Under what circumstances does PreparedStatement use stored plans? |
| Дата | |
| Msg-id | 25164.1081881760@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Under what circumstances does PreparedStatement use stored plans? (James Robinson <jlrobins@socialserve.com>) |
| Ответы |
Re: Under what circumstances does PreparedStatement use stored
|
| Список | pgsql-jdbc |
James Robinson <jlrobins@socialserve.com> writes:
> ... I suppose this all assumes that the lookup + maintenance of such a
> datastructure would ultimately cost less than re-planning all queries
> all the time.
I think that is a safe bet to be true, as long as you get *some* mileage
out of the plan cache. If the application issues a bunch of
no-two-alike queries then it's a loss of course. But doesn't the JDBC
API distinguish prepared statements from unprepared ones? ISTM it is
the app programmer's responsibility to prepare just those statements
he's likely to use more than once. I don't think the driver need
second-guess this choice.
regards, tom lane
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера