Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 094AF632D09 for ; Fri, 15 Jan 2010 21:23:57 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 40142-06 for ; Sat, 16 Jan 2010 01:23:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id 5DB3D632C94 for ; Fri, 15 Jan 2010 21:23:44 -0400 (AST) Received: from 121-98-80-66.bitstream.orcon.net.nz ([121.98.80.66] helo=[192.168.1.4]) by tremor.opencloud.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NVxO7-0005wf-CQ; Sat, 16 Jan 2010 14:23:39 +1300 Message-ID: <4B511515.6090809@opencloud.com> Date: Sat, 16 Jan 2010 14:23:33 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: "John T. Dow" CC: "pgsql-jdbc@postgresql.org" Subject: Re: refreshRow is slow References: <201001160014.o0G0EJWO035231@web2.nidhog.com> In-Reply-To: <201001160014.o0G0EJWO035231@web2.nidhog.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/34 X-Sequence-Number: 20230 John T. Dow wrote: > Certainly that piece of code can be made more efficient. One query ought to be able to return all the primary keys. It's not the PKs it is after (it's already worked those out earlier), it's the column names to select to populate the rest of the resultset. But yes, it could be more efficient. We'd need a static String[] Field.getColumnNames(Connection,Field[]) method or similar. -O