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 "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2009/10/15 00:54:31 UTC

[jira] Created: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
--------------------------------------------------------------------------------------

                 Key: DERBY-4409
                 URL: https://issues.apache.org/jira/browse/DERBY-4409
             Project: Derby
          Issue Type: Improvement
          Components: Test
            Reporter: Dag H. Wanvik
            Priority: Minor


For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
patch OrderByAndSortAvoidance-faster.


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


[jira] Commented: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765808#action_12765808 ] 

Dag H. Wanvik commented on DERBY-4409:
--------------------------------------

Uploaded patch to make OrderByAndSortAvoidance run faster. 

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Commented: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766519#action_12766519 ] 

Dag H. Wanvik commented on DERBY-4409:
--------------------------------------

Thanks for fixing that howler, Ole!

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: DERBY-4409_min_diff.txt, DERBY-4409_min_stat.txt, OrderByAndSortAvoidance-faster-2.diff, OrderByAndSortAvoidance-faster-2.stat, OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Commented: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765948#action_12765948 ] 

Knut Anders Hatlen commented on DERBY-4409:
-------------------------------------------

+1. Looks like an improvement to me.

The calls to rollback() in the test cases are not actually needed, because (a) auto-commit is enabled, (b) BaseJDBCTestCase.tearDown() already calls rollback(), and (c) all the tests are read-only.

(The test originally had auto-commit disabled because setUp() called setAutoCommit(false). Calling setAutoCommit(false) from the decorator does not have the same effect because it uses a different Connection instance. This is just an observation, and I'm not suggesting that we should disable auto-commit again.)

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Commented: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

Posted by "Ole Solberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766506#action_12766506 ] 

Ole Solberg commented on DERBY-4409:
------------------------------------

DERBY-4409_min_diff.txt committed to trunk as revision 825847.

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: DERBY-4409_min_diff.txt, DERBY-4409_min_stat.txt, OrderByAndSortAvoidance-faster-2.diff, OrderByAndSortAvoidance-faster-2.stat, OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Commented: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

Posted by "Ole Solberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766501#action_12766501 ] 

Ole Solberg commented on DERBY-4409:
------------------------------------

TinderBox test / suites.All failed with just exitting.
Looking at the diff, via JIRA, I found a 'System.exit(1);':

-        commit();
-        super.tearDown();
+                    getConnection().commit();
+                    System.exit(1);
+                }
+            };
     }
 
     /**
@@ -10295,7 +10298,7 @@
         	"ORDER BY CS.ID DESC";


Running suites.All now with a minimal patch that replaces 'System.exit(1);' with the original  'st.close();'

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: OrderByAndSortAvoidance-faster-2.diff, OrderByAndSortAvoidance-faster-2.stat, OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Resolved: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

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

Dag H. Wanvik resolved DERBY-4409.
----------------------------------

    Resolution: Fixed

Resolving this; can be reopened if we find more re-write candidates of the same kind.

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: OrderByAndSortAvoidance-faster-2.diff, OrderByAndSortAvoidance-faster-2.stat, OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Updated: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

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

Ole Solberg updated DERBY-4409:
-------------------------------

    Attachment: DERBY-4409_min_stat.txt
                DERBY-4409_min_diff.txt

DERBY-4409_min_diff.txt:
minor patch that replaces 'System.exit(1);' with the original 'st.close();'

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: DERBY-4409_min_diff.txt, DERBY-4409_min_stat.txt, OrderByAndSortAvoidance-faster-2.diff, OrderByAndSortAvoidance-faster-2.stat, OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Updated: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

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

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

    Issue & fix info:   (was: [Patch Available])
       Fix Version/s: 10.6.0.0

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: OrderByAndSortAvoidance-faster-2.diff, OrderByAndSortAvoidance-faster-2.stat, OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Updated: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

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

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

    Attachment: OrderByAndSortAvoidance-faster-2.stat
                OrderByAndSortAvoidance-faster-2.diff

I agree, thanks! Upload rev 2 removing the vacuous rollback calls.

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: OrderByAndSortAvoidance-faster-2.diff, OrderByAndSortAvoidance-faster-2.stat, OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Commented: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766290#action_12766290 ] 

Dag H. Wanvik commented on DERBY-4409:
--------------------------------------

Committed OrderByAndSortAvoidance-faster-2 as svn 825682.


> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: OrderByAndSortAvoidance-faster-2.diff, OrderByAndSortAvoidance-faster-2.stat, OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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


[jira] Updated: (DERBY-4409) Make some tests run faster by using CleanDatabaseSetup + decorateSQL + rollback idiom

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

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

    Attachment: OrderByAndSortAvoidance-faster.stat
                OrderByAndSortAvoidance-faster.diff

> Make some tests run faster by using  CleanDatabaseSetup + decorateSQL + rollback idiom
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-4409
>                 URL: https://issues.apache.org/jira/browse/DERBY-4409
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: OrderByAndSortAvoidance-faster.diff, OrderByAndSortAvoidance-faster.stat
>
>
> For example, for OrderByAndSortAvoidance, this reduces running time on my box from ca 5 minutes to ca 1 minute, cf
> patch OrderByAndSortAvoidance-faster.

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