Re: [GENERAL] 7.3 Prepared statements [Viruschecked]
От | Patric Bechtel |
---|---|
Тема | Re: [GENERAL] 7.3 Prepared statements [Viruschecked] |
Дата | |
Msg-id | 20030103093536.E5031475AE6@postgresql.org обсуждение исходный текст |
Ответ на | Re: [GENERAL] 7.3 Prepared statements (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-jdbc |
On Thu, 2 Jan 2003 23:47:05 -0500 (EST), Bruce Momjian wrote: > >I would ask on the jdbc lists. I am Cc'ing them, and removing the >general list. > >--------------------------------------------------------------------------- > >Charles H. Woloszynski wrote: >> Bruce: >> >> Do you mean that, under JDBC with PG7.3, it will use the stored >> execution plan, or that we should ask the JDBC driver maintainers to >> work to use this feature to use the stored executiong plan? >> >> I am obviously interested in helping make this happen to improve the >> overall PostgreSQL solution. Should I contact someone specific about >> this to see if there are plans to make this happen in the near future? >> I think I have a solid framework to test its effectiveness with decent >> performance monitoring tools already in place. >> >> Thanks, >> >> Charlie As I dipped my nose a bit deeper into that the last few days, I think I can tell you that the JDBC driver (7.3.1 and the current CVS) doesn't use server side prepared statements automatically. I changed that with a patch I announced yesterday. As soon as it will be accepted, it will. If you want to try it out *NOW*, you should to something like this: ((org.postgresql.jdbc1.AbstractJdbc1Statement)statement).setUseServerPrepare(true); It's kind of clumsy, and does clue your app to pgsql a bit, but for a test, it's ok. (You could also try out my patch, it's on the pgsql-patches list :-)) Don't overestimate the performance win for prepared statements, as the optimizer can NOT really calculated the perfect plan, if the statement is too unspecific. At the moment there's a bug regarding boolean values in server side prepared statements. My patch fixes this, too. I hope it will be applied soon... tia Patric
В списке pgsql-jdbc по дате отправления: