Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 67F9D2E0102 for ; Wed, 9 Jan 2008 15:55:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 60993-06 for ; Wed, 9 Jan 2008 15:54:47 -0400 (AST) Received: from bay0-omc1-s14.bay0.hotmail.com (bay0-omc1-s14.bay0.hotmail.com [65.54.246.86]) by postgresql.org (Postfix) with ESMTP id CC6D82E0060 for ; Wed, 9 Jan 2008 15:54:49 -0400 (AST) Received: from hotmail.com ([65.54.162.92]) by bay0-omc1-s14.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 9 Jan 2008 11:54:48 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 9 Jan 2008 11:54:48 -0800 Message-ID: Received: from 76.119.179.89 by BAY108-DAV20.phx.gbl with DAV; Wed, 09 Jan 2008 19:54:42 +0000 X-Originating-IP: [76.119.179.89] X-Originating-Email: [mgainty@hotmail.com] X-Sender: mgainty@hotmail.com From: "Martin Gainty" To: , References: <200801092002.15417.mljv@planwerk6.de> Subject: Re: Prepared Statements Date: Wed, 9 Jan 2008 14:50:29 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-OriginalArrivalTime: 09 Jan 2008 19:54:48.0567 (UTC) FILETIME=[7D7BF870:01C852F9] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/399 X-Sequence-Number: 126609 straight from jdbc2.1 doc http://java.sun.com/j2se/1.3/docs/guide/jdbc/spec2/jdbc2.1.frame6.html Statement Statement object to submit a set of heterogeneous update commands together as a single unit, or batch, to the underlying DBMS i.e. execute Statement without parameters http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html PreparedStatement An element in a batch consists of a parameterized command and an associated set of parameters when a PreparedStatement is used. (i.e. A Statement with params) http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html CallableStatement Multiple sets of input parameter values may be associated with a callable statement and sent to the DBMS together. (For procedures) http://java.sun.com/j2se/1.4.2/docs/api/java/sql/CallableStatement.html Viel Gluck Martin ----- Original Message ----- From: To: Sent: Wednesday, January 09, 2008 2:02 PM Subject: [GENERAL] Prepared Statements > Hi, > > i am trying to understand "Prepared Statements". I am asking because i want to > understand the impact of "Prepared statements" to my application. > > Actually i use Hibernate, DBCP Connection Pool with Postgresql-JDBC Driver and > Postgresql 8.1. > > - I know there is a PREPARE Statement in Postgresql and read the docs. > - in PostgresqlJDBC i have a prepareThreshold parameter which i left to > default of 5. > - in DBCP i have a property "poolPreparedStatements", set to true. Does ist > just configure prepareThreshold of JDBC or does it maintain a statementPool > of it's own? > > In my Log files of postgresql each query is called like this: > > EXECUTE [PREPARE: select ...] > > I have not found anything about preparing "unnamed" statements. What does it > mean? > > many questions, but i was googling a lot and "Prepared Statement" is a > somewhat ambiguous expression, isn't it? Can someone clarify this to me, > please? > > kind regards, > Janning > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org/ >