Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id BDAE29FA2EC for ; Sat, 28 Oct 2006 08:17:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 70835-04 for ; Sat, 28 Oct 2006 11:17:37 +0000 (UTC) X-Greylist: whitelisted by SQLgrey- Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by postgresql.org (Postfix) with ESMTP id 388409FA491 for ; Sat, 28 Oct 2006 08:17:37 -0300 (ADT) Received: from [127.0.0.1] (gra94-2-82-66-143-25.fbx.proxad.net [82.66.143.25]) by smtp6-g19.free.fr (Postfix) with ESMTP id 694DE434E3; Sat, 28 Oct 2006 13:17:35 +0200 (CEST) Message-ID: <45433C4B.6020300@genoscope.cns.fr> Date: Sat, 28 Oct 2006 13:17:31 +0200 From: Julien Patrouix User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: fr, en MIME-Version: 1.0 To: Bucky Jordan CC: Simon Riggs , pgsql-jdbc@postgresql.org Subject: Re: jdbc driver performance TODO References: <78ED28FACE63744386D68D8A9D1CF5D4209E10@MAIL.corp.lumeta.com> In-Reply-To: <78ED28FACE63744386D68D8A9D1CF5D4209E10@MAIL.corp.lumeta.com> Content-Type: multipart/alternative; boundary="------------050805090709070808080407" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.589 tagged_above=0 required=5 tests=HTML_30_40, HTML_MESSAGE, HTML_TITLE_EMPTY X-Spam-Level: X-Archive-Number: 200610/125 X-Sequence-Number: 16008 This is a multi-part message in MIME format. --------------050805090709070808080407 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit In my opinion, improvements could be made in the encoding/decoding of the protocole messages (Ie the PGStream class). From what I have seen thanks to a profiler some methods are over invoked, and the numeric encoding is not as efficient as it could be. That numeric encoding/decoding is used very often, even for the protocole purposes, not only for data encoding. Furthermore, it would be interesting not to use the java BufferedStream implementation, and use a specific one so as to directly manage and access the buffer. From the driver point of view, this is the core part to optimize since everything starts or goes from/through this part (the protocole encoding). I use a driver I have optimized, and submitted these obervations a couple of time to the list, but I'm really sorry I can't contribute more for a long time I'm afraid Nevertheless, anyone that would look into these parts of the code could make that optimisations again as they are quite simple to achieve. Regards. Bucky Jordan a écrit : >My first vote would go to adding support for COPY. (Where would I find a >design doc for this if one exists? I'm sort of curious how this will >work..) > >My other is more of a question relating to parameterized statements and >prepared statements, so I'm sending it in another post since I'm not >sure if it qualifies as a TO-DO request. > >Thanks, > >Bucky > > > > > >>-----Original Message----- >>From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc- >>owner@postgresql.org] On Behalf Of Simon Riggs >>Sent: Friday, October 27, 2006 6:58 PM >>To: pgsql-jdbc@postgresql.org >>Subject: [JDBC] jdbc driver performance TODO >> >>I'm interested in updating the performance TODO list for the jdbc >>driver. I want to refresh the TODO list with any new items people are >>aware of, plus make sure each item has a link to an agreed design if >> >> >one > > >>exists. >> >>Forgive me for the observation, but the current list does seem to be a >>little out of date: >>- Add statement pooling to take advantage of server prepared >> >> >statements. > > >>- Allow scrollable ResultSets to not fetch all results in one batch. >>- Allow refcursor ResultSets to not fetch all results in one batch. >>- Allow binary data transfers for all datatypes not just bytea. >> >>Could I shake the tree for any new performance suggestions? Or maybe >> >> >not > > >>new exactly, but just not listed. Lots of detail please.... >> >>-- >> Simon Riggs >> EnterpriseDB http://www.enterprisedb.com >> >> >> >>---------------------------(end of >> >> >broadcast)--------------------------- > > >>TIP 3: Have you checked our extensive FAQ? >> >> http://www.postgresql.org/docs/faq >> >> > >---------------------------(end of broadcast)--------------------------- >TIP 5: don't forget to increase your free space map settings > > --------------050805090709070808080407 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit In my opinion, improvements could be made in the encoding/decoding of the protocole messages (Ie the PGStream class).
From what I have seen thanks to a profiler some methods are over invoked, and the numeric encoding is not as efficient as it could be.
That numeric encoding/decoding is used very often, even for the protocole purposes, not only for data encoding.

Furthermore, it would be interesting not to use the java BufferedStream implementation, and use a specific one so as to directly manage and access the buffer.

From the driver point of view, this is the core part to optimize since everything starts or goes from/through this part (the protocole encoding).

I use a driver I have optimized, and submitted these obervations a couple of time to the list, but I'm really sorry I can't contribute more for a long time I'm afraid
Nevertheless, anyone that would look into these parts of the code could make that optimisations again as they are quite simple to achieve.

Regards.

Bucky Jordan a écrit :
My first vote would go to adding support for COPY. (Where would I find a
design doc for this if one exists? I'm sort of curious how this will
work..)

My other is more of a question relating to parameterized statements and
prepared statements, so I'm sending it in another post since I'm not
sure if it qualifies as a TO-DO request.

Thanks,

Bucky



  
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-
owner@postgresql.org] On Behalf Of Simon Riggs
Sent: Friday, October 27, 2006 6:58 PM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] jdbc driver performance TODO

I'm interested in updating the performance TODO list for the jdbc
driver. I want to refresh the TODO list with any new items people are
aware of, plus make sure each item has a link to an agreed design if
    
one
  
exists.

Forgive me for the observation, but the current list does seem to be a
little out of date:
- Add statement pooling to take advantage of server prepared
    
statements.
  
- Allow scrollable ResultSets to not fetch all results in one batch.
- Allow refcursor ResultSets to not fetch all results in one batch.
- Allow binary data transfers for all datatypes not just bytea.

Could I shake the tree for any new performance suggestions? Or maybe
    
not
  
new exactly, but just not listed. Lots of detail please....

--
  Simon Riggs
  EnterpriseDB   http://www.enterprisedb.com



---------------------------(end of
    
broadcast)---------------------------
  
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq
    

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
  

--------------050805090709070808080407--