Re: [JDBC] Prepare Statement
От | Jie Liang |
---|---|
Тема | Re: [JDBC] Prepare Statement |
Дата | |
Msg-id | E7E213858379814A9AE48CA6754F5ECB034518F9@mail01.stbernard.com обсуждение исходный текст |
Ответы |
Re: [JDBC] Prepare Statement
|
Список | pgsql-sql |
Kirs, I re-compile with setUseServerPrepare(true), it works fine, thanks. However, reading from my log file, what I saw is that five same SELECTs with different argument, so I am wondering that the PrepareStatement really save time than individualy execute five SELECTs ??? If I use one "parepare sql command" and five "execute sql commands", the log file shown what I typed, so I think it really used server side prepared object! Any comment? Thanks. Jie Liang -----Original Message----- From: Kris Jurka [mailto:books@ejurka.com] Sent: Wednesday, June 16, 2004 9:30 PM To: Jie Liang Cc: Tom Lane; pgsql-sql@postgresql.org; pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Prepare Statement On Wed, 16 Jun 2004, Jie Liang wrote: > Kris, > Thank you for your valuable response, I used the code you list > following: > > [7.5 code example] > > Then, the compiler complaint: > ServerSidePreparedStatement.java:20: cannot resolve symbol symbol : > method setPrepareThreshold (int) > location: interface org.postgresql.PGStatement > pgstmt.setPrepareThreshold(3); I downloaded > pg74.213.jdbc2.jar and pg74.213.jdbc2ee.jar at This example is from the 7.5 documentation and requires a pgdev.302.jdbcX.jar file. I mentioned this cvs example because this functionality is undocumented in the released version. In the 7.4 version the enabling of server side statements is only possible via a boolean flag at the statement level, namely PGStatement.setUseServerPrepare(true); Kris Jurka
В списке pgsql-sql по дате отправления: