X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A52F08BA3E6 for ; Wed, 16 Feb 2005 04:15:54 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 17638-01 for ; Wed, 16 Feb 2005 04:15:35 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.200]) by svr1.postgresql.org (Postfix) with ESMTP id 6E9AF8BA3E9 for ; Wed, 16 Feb 2005 04:14:51 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 68so29979wri for ; Tue, 15 Feb 2005 20:14:38 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=p7FT0Rou5dvMR/7oRTw0psyhwBO64E270j5aJolI3r16BzmgnQd3/7RhLr71PRKnLFMFvYzhke5rMjPmeYHy4MOk/REBz6g0eIC1pd87/TQeBibm4PTA3w0Z2m+kWMcIOsfOYoOByjodT0nvbpa+csGr253/l9dT4oVjJso6HZc= Received: by 10.54.32.72 with SMTP id f72mr115371wrf; Tue, 15 Feb 2005 20:14:38 -0800 (PST) Received: by 10.54.31.32 with HTTP; Tue, 15 Feb 2005 20:14:38 -0800 (PST) Message-ID: <2989532e05021520146d6069f0@mail.gmail.com> Date: Wed, 16 Feb 2005 09:44:38 +0530 From: Antony Paul Reply-To: Antony Paul To: Oliver Jowett Subject: Re: Pass column name in preparedstatement Cc: pgsql-jdbc@postgresql.org In-Reply-To: <42127EEC.3000502@opencloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <2989532e050215032031e9aeb8@mail.gmail.com> <4211E2E1.4090506@opencloud.com> <2989532e05021504045fc879fe@mail.gmail.com> <42127EEC.3000502@opencloud.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.544 tagged_above=0 required=5 tests=AWL, FROM_ENDS_IN_NUMS, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200502/114 X-Sequence-Number: 12294 The one glitch I have with 7.3.3 is with functional index and it is solved in 8.x only. But the client is not ready to upgrade to 8.x series until it ages 4-6 months. So I dont find any use in upgrading. I have to consider the work invloved in upgrading. rgds Antony Paul On Wed, 16 Feb 2005 11:59:56 +1300, Oliver Jowett wrote: > Antony Paul wrote: > > In 7.3.3 is there any use in using PreparedStatement since the columns > > may change for each query. > > It depends on your application; are there non-column-name parameters? If > so, using PreparedStatement still gives you the benefit that you do not > have to escape those parameters by hand. > > Under 7.3.x there's no real performance benefit to reusing > PreparedStatements, as the v3 protocol (supporting server-side query > parameterization and reuse) was only introduced in 7.4. Under 7.4 or > 8.0, there is some scope for improved performance if you reuse > PreparedStatements. As your query strings are changing, you may want to > have a cache to preserve a PreparedStatement for frequently used queries. > > You really should upgrade if you're still using 7.3.3, at least to the > latest 7.3.x. > > -O >