Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 13A98633077 for ; Tue, 10 Aug 2010 14:56:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 56093-06 for ; Tue, 10 Aug 2010 17:56:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 459EF632E53 for ; Tue, 10 Aug 2010 14:56:30 -0300 (ADT) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id B2EB4284F7; Tue, 10 Aug 2010 13:56:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=L0cxW/fkYEkpQcg9CN+Pf2UPLgY=; b=holBUk Hy+IwO/vuxC1WvrYsTnHhvwJ/YbWsb+5MTOFPoczM9A/woQh/xLzNHvgj54x/+Ew 16zp0UceNQEEvOj5JxJgvDL0jeXMotvdAfmePt7+4HR3z9lpMme525MBtCALZadR UuwUYz+00J+qAKeDUXhCTyv71U9ucMUEdtF6w= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id A3BB0284EA; Tue, 10 Aug 2010 13:56:28 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 493C1A250; Tue, 10 Aug 2010 13:56:28 -0400 (EDT) Date: Tue, 10 Aug 2010 13:56:27 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: "John T. Dow" cc: pgsql-jdbc Subject: Re: 9.0 Driver In-Reply-To: <201008090104.o7914iMR060897@web7.nidhog.com> Message-ID: References: <201008090104.o7914iMR060897@web7.nidhog.com> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/41 X-Sequence-Number: 20844 On Sun, 8 Aug 2010, John T. Dow wrote: > There is, I believe, a problem with the JDBC driver in that it gives > very poor performance doing a refreshRow. The problem is that the driver > queries the server for every column in the resultset. > > I implemented a quick and dirty fix by modifying the driver to (on > demand) use the labels returned in the resultset. > > This solution of course will fail if the original query used an alias > for a column. Other than that, it seems to be a good solution. > > Apparently I am the only one who uses refreshrow, because I reported the > fact that it was slow in January (and there was a little discussion) but > when in April I reported my crude solution there was no discussion. I think it's a combination of factors, few people use refreshRow and fewer people use it on results with hundreds of columns. Yes, it is slow, but it isn't abysmal and it's only slow for the first refreshRow execution on the ResultSet, so subsequent refreshes are fast. As you've stated, the solution you've implemented is inadequate for the general case, so I'm not sure what further discussion there should be about it. Is there something in particular you'd like feedback on? So yes, it's a known issue, but not a high priority one. Kris Jurka