You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <de...@db.apache.org> on 2006/01/17 01:46:20 UTC

[jira] Created: (DERBY-818) Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.

Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.
-----------------------------------------------------------------------------------------

         Key: DERBY-818
         URL: http://issues.apache.org/jira/browse/DERBY-818
     Project: Derby
        Type: Improvement
  Components: JDBC, Performance  
    Reporter: Daniel John Debrunner
 Assigned to: Daniel John Debrunner 
    Priority: Minor


The fields columnGotUpdated and copyOfDatabaseRow are allocated and maintained in EmbedResultSet for every ResultSet but they are only required if the result set is updateable. I saw a 5% improvement in execution rate on a simple VALUES clause when fixing this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-818) Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-818?page=comments#action_12363286 ] 

Daniel John Debrunner commented on DERBY-818:
---------------------------------------------

There is a similar issue for the code to ensure a stream is only fetched once. The boolean array streamUsedFlags is allocated on every ResultSet and reset on every move position call. In many cases there will be no streaming columns and getXXXStream will never be called. Fixing this allowed a 2-3% improvement in the same VALUES clause. The fix is to allocate the array only on demand when a getXXXStream call is made. WIll address this as part of this issue.Will also add comments for this stream re-use code.

> Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.
> -----------------------------------------------------------------------------------------
>
>          Key: DERBY-818
>          URL: http://issues.apache.org/jira/browse/DERBY-818
>      Project: Derby
>         Type: Improvement
>   Components: JDBC, Performance
>     Reporter: Daniel John Debrunner
>     Assignee: Daniel John Debrunner
>     Priority: Minor
>  Attachments: derby818patch.txt
>
> The fields columnGotUpdated and copyOfDatabaseRow are allocated and maintained in EmbedResultSet for every ResultSet but they are only required if the result set is updateable. I saw a 5% improvement in execution rate on a simple VALUES clause when fixing this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-818) Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-818:
--------------------------------

    Derby Categories: [Performance]

> Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-818
>                 URL: https://issues.apache.org/jira/browse/DERBY-818
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>            Reporter: Daniel John Debrunner
>            Assignee: Daniel John Debrunner
>            Priority: Minor
>             Fix For: 10.2.1.6
>
>         Attachments: derby818patch.txt
>
>
> The fields columnGotUpdated and copyOfDatabaseRow are allocated and maintained in EmbedResultSet for every ResultSet but they are only required if the result set is updateable. I saw a 5% improvement in execution rate on a simple VALUES clause when fixing this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-818) Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-818?page=all ]

Daniel John Debrunner updated DERBY-818:
----------------------------------------

    Attachment: derby818patch.txt

This patch addresses the issue by:
1) Only allocating the arrays if the ResultSet is updateable
2) Only reseting the arrays in next() if they  have been allocated
3) Using Arrays.fill() to reset the array.
4) Removing the reset of the arrays from the close() method, I can't see any logic for placing it there.

I'd appreciate anyone who has worked on updateable result sets looking at the patch.

I'm re-running derbyall to ensure no failures with the patch.


> Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.
> -----------------------------------------------------------------------------------------
>
>          Key: DERBY-818
>          URL: http://issues.apache.org/jira/browse/DERBY-818
>      Project: Derby
>         Type: Improvement
>   Components: JDBC, Performance
>     Reporter: Daniel John Debrunner
>     Assignee: Daniel John Debrunner
>     Priority: Minor
>  Attachments: derby818patch.txt
>
> The fields columnGotUpdated and copyOfDatabaseRow are allocated and maintained in EmbedResultSet for every ResultSet but they are only required if the result set is updateable. I saw a 5% improvement in execution rate on a simple VALUES clause when fixing this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-818) Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-818?page=all ]
     
Daniel John Debrunner resolved DERBY-818:
-----------------------------------------

    Fix Version: 10.2.0.0
     Resolution: Fixed

> Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.
> -----------------------------------------------------------------------------------------
>
>          Key: DERBY-818
>          URL: http://issues.apache.org/jira/browse/DERBY-818
>      Project: Derby
>         Type: Improvement
>   Components: JDBC, Performance
>     Reporter: Daniel John Debrunner
>     Assignee: Daniel John Debrunner
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: derby818patch.txt
>
> The fields columnGotUpdated and copyOfDatabaseRow are allocated and maintained in EmbedResultSet for every ResultSet but they are only required if the result set is updateable. I saw a 5% improvement in execution rate on a simple VALUES clause when fixing this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-818) Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.

Posted by "Mamta A. Satoor (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-818?page=comments#action_12362911 ] 

Mamta A. Satoor commented on DERBY-818:
---------------------------------------

I looked through the changes and they look good. I should have been more cautious when I originally wrote this code.

> Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.
> -----------------------------------------------------------------------------------------
>
>          Key: DERBY-818
>          URL: http://issues.apache.org/jira/browse/DERBY-818
>      Project: Derby
>         Type: Improvement
>   Components: JDBC, Performance
>     Reporter: Daniel John Debrunner
>     Assignee: Daniel John Debrunner
>     Priority: Minor
>  Attachments: derby818patch.txt
>
> The fields columnGotUpdated and copyOfDatabaseRow are allocated and maintained in EmbedResultSet for every ResultSet but they are only required if the result set is updateable. I saw a 5% improvement in execution rate on a simple VALUES clause when fixing this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-818) Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-818?page=all ]
     
Daniel John Debrunner closed DERBY-818:
---------------------------------------


> Read-only embedded ResultSets incur performance penalty due to updateable ResultSet code.
> -----------------------------------------------------------------------------------------
>
>          Key: DERBY-818
>          URL: http://issues.apache.org/jira/browse/DERBY-818
>      Project: Derby
>         Type: Improvement
>   Components: JDBC, Performance
>     Reporter: Daniel John Debrunner
>     Assignee: Daniel John Debrunner
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: derby818patch.txt
>
> The fields columnGotUpdated and copyOfDatabaseRow are allocated and maintained in EmbedResultSet for every ResultSet but they are only required if the result set is updateable. I saw a 5% improvement in execution rate on a simple VALUES clause when fixing this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira