Re: [GENERAL] JDBC prepared statement is not treated as prepared statement

2013-06-18 Thread 高健
Hello : >Server prepared statements are kept in the private memory of the >PostgreSQL backend process. If you need a statement only once or >twice, it would be wasteful to keep it around. >The idea is that it is worth the effort only if the statement is executed >more than a couple of times.

Re: [GENERAL] JDBC prepared statement is not treated as prepared statement

2013-06-18 Thread Albe Laurenz
高健 wrote: > I change my Java program by adding the following: > > org.postgresql.PGStatement pgt = (org.postgresql.PGStatement)pst; > pgt.setPrepareThreshold(1); > > I can see an entry is in pg_prepared_statements now. Good. > But the hyperlink's documentation made me a little confused. I also

Re: [GENERAL] JDBC prepared statement is not treated as prepared statement

2013-06-17 Thread 高健
Hello: Thanks to Laurenz. Your information is very helpful for me. I change my Java program by adding the following: org.postgresql.PGStatement pgt = (org.postgresql.PGStatement)pst; pgt.setPrepareThreshold(1); I can see an entry is in pg_prepared_statements now. But the hyperlink's docu

Re: [GENERAL] JDBC prepared statement is not treated as prepared statement

2013-06-17 Thread Albe Laurenz
高健 wrote: > I have one question about prepared statement. > I use Java via JDBC, then send prepared statement to execute. > I thought that the pg_prepared_statments view will have one record after my > execution. > But I can't find. > > Is the JDBC's prepared statement differ from SQL execut

[GENERAL] JDBC prepared statement is not treated as prepared statement

2013-06-16 Thread 高健
Hello: I have one question about prepared statement. I use Java via JDBC, then send prepared statement to execute. I thought that the pg_prepared_statments view will have one record after my execution. But I can't find. Is the JDBC's prepared statement differ from SQL execute by prepar