Re: Prepare Statement - Mailing list pgsql-sql

From Jie Liang
Subject Re: Prepare Statement
Date
Msg-id E7E213858379814A9AE48CA6754F5ECB0345182D@mail01.stbernard.com
Whole thread Raw
In response to Prepare Statement  ("Jie Liang" <jie@stbernard.com>)
List pgsql-sql
Tom,

Does java.sql.PreparedStatement do the same thing as SQL command
prepare/execute ??
Which one should be used while I am using jdbc talking to postgresql? If
using both, do them help the performance?


Thanks.



Jie Liang

-----Original Message-----
From: Jie Liang
Sent: Monday, June 14, 2004 4:33 PM
To: Tom Lane
Cc: pgsql-sql@postgresql.org; pgsql-jdbc@postgresql.org
Subject: [SQL] Prepare Statement


Hi,

I have a question about performance, in SQL commands: there is a
prepare/execute command, document says it will improve the performance
while repeatly execute a statement. In java.sql: there is a
PreparedStatement object, which can store precompiled SQL statement,
document says it can improve the performance also. If I use java jdbc to
connect postgresql database, which one I should use? Can I use both?


Thanks.



Jie Liang

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

pgsql-sql by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Last insert id
Next
From: Patrick Hatcher
Date:
Subject: Is there a faster way to do this?