| От | Tom Lane |
|---|---|
| Тема | Re: JBoss w/int8 primary keys in postgres ... |
| Дата | |
| Msg-id | 22567.1063258821@sss.pgh.pa.us обсуждение |
| Ответ на | Re: JBoss w/int8 primary keys in postgres ... (Oliver Jowett <oliver@opencloud.com>) |
| Ответы |
Re: JBoss w/int8 primary keys in postgres ...
|
| Список | pgsql-jdbc |
Oliver Jowett <oliver@opencloud.com> writes:
> which should use the index. However with server-side prepared queries
> enabled the query is transformed to something like this:
> PREPARE jdbc_statement_N(int8) AS SELECT * FROM foo WHERE bar = $1;
> EXECUTE jdbc_statement_N(12345)
> Which I suspect won't use the index as $1 is typed to int8. (anyone know for
> sure? I can't find an easy way to get at the query plan produced by
> PREPARE).
In 7.4 you can do EXPLAIN EXECUTE. But no, this wouldn't use the index
:-(. What exactly is causing the driver to decide to type the parameter
as int8?
regards, tom lane
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера