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 A326A8BA20B for ; Tue, 15 Feb 2005 12:27:40 +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 36902-10 for ; Tue, 15 Feb 2005 12:27:38 +0000 (GMT) Received: from smtp1.mailblocks.com (smtp1.mailblocks.com [140.174.9.69]) by svr1.postgresql.org (Postfix) with SMTP id 5357C8BA1E5 for ; Tue, 15 Feb 2005 12:27:37 +0000 (GMT) Received: (qmail 18478 invoked from network); 15 Feb 2005 12:27:18 -0000 Received: from 10.10.0.51 (HELO mailblocks.com) (10.10.0.51) by 10.10.0.7 with SMTP; 15 Feb 2005 12:27:18 -0000 MIME-Version: 1.0 To: Antony Paul Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed References: <2989532e050215032031e9aeb8@mail.gmail.com> <4211E2E1.4090506@opencloud.com> <2989532e05021504045fc879fe@mail.gmail.com> <4211EAA3.3090905@mailblocks.com> X-Accept-Language: en-us, en Content-Transfer-Encoding: 7bit Subject: Re: Pass column name in preparedstatement X-MB-Message-Source: ClientSMTP Received: from 82.182.133.12 by app2.mailblocks.com (192.168.225.51) with SMTP (authenticated); Tue, 15 Feb 2005 04:27:17 -0800 X-MB-Message-Type: User Message-Id: From: Thomas Hallgren In-Reply-To: <2989532e05021504045fc879fe@mail.gmail.com> Date: Tue, 15 Feb 2005 13:27:15 +0100 User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.434 tagged_above=0 required=5 tests=AWL, DNS_FROM_AHBL_RHSBL, DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200502/110 X-Sequence-Number: 12290 Antony Paul wrote: > In 7.3.3 is there any use in using PreparedStatement since the columns > may change for each query. > Depends on the use case. I created a solution a while back where I used a MRU cache to hold the 10 or so most frequently generated PreparedStatements. In my case that improved performance a whole lot. This was not a PostgreSQL database though but I guess the effect could be similar. Regards, Thomas Hallgren