Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 0CE7C2E002F for ; Sat, 16 Feb 2008 13:02:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 93081-01-3 for ; Sat, 16 Feb 2008 13:02:16 -0400 (AST) Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with ESMTP id 84D642E002C for ; Sat, 16 Feb 2008 13:02:17 -0400 (AST) Received: from [192.168.7.2] (71-208-179-197.hlrn.qwest.net [71.208.179.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail63.csoft.net (Postfix) with ESMTP id 00B9D28632; Sat, 16 Feb 2008 12:02:15 -0500 (EST) Message-ID: <47B71714.2050202@ejurka.com> Date: Sat, 16 Feb 2008 10:02:12 -0700 From: Kris Jurka User-Agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080109) MIME-Version: 1.0 To: Gustav Trede CC: pgsql-jdbc@postgresql.org Subject: Re: extra rowcopy in ResultSet allways needed ?. References: <47B6FF78.9010802@telia.com> <47B71107.70302@telia.com> In-Reply-To: <47B71107.70302@telia.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/105 X-Sequence-Number: 18312 Gustav Trede wrote: > Kris Jurka skrev: >> The rowBuffer copy is only needed for updateable ResultSets, so we >> could probably wrap all those calls with isUpdateable() { }. Are you >> seein a significant performance impact from those calls or are you >> just curious? >> > > its good news that its avoidable. > I buffer roughly 2Gbyte of data by jdbc in RAM. > im using several threads to max the speed and im currently cpu bound for > performance. > its importent for me to keep the init time as low as possible, since it > delays failover response in my setup. > (long time outs on client IO keeps client in an ok state though.) > > I have a general interests in performance despite that im using > webservices for clients =), > and tend to look around in code on my sparetime, and i sometimes find > things. > Whenever the things are not risky to implement, its often to be > considered free as in beer. > Its only if there is noticable complexity, that the performance boost > must be proven to be very substantial inorder > to motivate risky code changes imo. > > I would be happy if its possible to check for isUpdatable in the > official codebase, > its a mess for me to keep local patches synced with CVS. > > I dont have any hard numbers atm. > If its needed, i can try to provide it next week or so ? > No I don't need the numbers, I was just curious if you had them handy. Also I was initially looking at the full cost of isUpdateable and the idea that for a small ResultSet it would be faster to just do the copy rather than doing the parsing and stuff to see if a ResultSet was updateable. Re-reading that now, we don't really want to call isUpdateable, but probably just wrap things in "if (resultsetconcurrency == ResultSet.CONCUR_UPDATABLE) { } ". That'll be a simple quick check that should always be a win. So are you planning on coding this up, or just throwing it out as a suggestion? Kris Jurka