[ 
https://issues.apache.org/jira/browse/DERBY-3842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693432#action_12693432
 ] 

Tiago R. Espinha commented on DERBY-3842:
-----------------------------------------

Here's what I get from the statistics after having:
1) Set sortBufferMax to 5
2) Made a Select statement with Order By to 1 column, on  a table with roughly 
6000 records of assorted data.

Source result set:
        Sort ResultSet:
        Number of opens = 1
        Rows input = 6148
        Rows returned = 6148
        Eliminate duplicates = false
        In sorted order = false
        Sort information: 
                Number of rows input=6148
                Number of rows output=6148
                Sort type=internal
                constructor time (milliseconds) = 0
                open time (milliseconds) = 0
                next time (milliseconds) = 0
                close time (milliseconds) = 0
                optimizer estimated row count:         5232.00
                optimizer estimated cost:         1105.97

Now, sort type=internal? I would have thought that it would give me "external" 
since the sortBufferMax is set to 5 and we have 6000 rows to sort, but nope. 
What can I possibly be doing wrong?

> Convert 
> "org.apache.derbyTesting.functionTests.tests.store.holdCursorExternalSortJDBC30.sql"
>  to junit.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3842
>                 URL: https://issues.apache.org/jira/browse/DERBY-3842
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Junjie Peng
>            Assignee: Tiago R. Espinha
>         Attachments: derby-3842-1.patch, derby-3842-1.stat, 
> derby-3842-tiago.patch
>
>


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

Reply via email to