About Connections and PreparedStatements - Mailing list pgsql-jdbc

From Hector Rosas
Subject About Connections and PreparedStatements
Date
Msg-id 25266c5c0510121210k8e16cf8id841ba11120aaf8b@mail.gmail.com
Whole thread Raw
Responses Re: About Connections and PreparedStatements
Re: About Connections and PreparedStatements
List pgsql-jdbc
Hello, I have a doubt with connections and PreparedStatemens. If I open a connection to Postgres and then request a prepared statement, this will be compiled and reused as long as I don't close the connection right? Or it doesn't matter if I close the connection, I'm using PooledConnection provided by my container (Orion), I want to know if there's an advantage to keep a connections open, in order to reutilize PreparedStatement. Also, I'm closing PreparedStatement after every query, PreparedStatement need to be closed after every query right? I mean, is not closing a PreparedStatement a way to increase performance?

Well, thanks everyone.

Jeziel.

pgsql-jdbc by date:

Previous
From: Russell Francis
Date:
Subject: Re: queries against CIDR fail against 8.0.3?
Next
From: Oliver Jowett
Date:
Subject: Re: About Connections and PreparedStatements