[ 
https://issues.apache.org/jira/browse/TRAFODION-2326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15635540#comment-15635540
 ] 

ASF GitHub Bot commented on TRAFODION-2326:
-------------------------------------------

Github user prashanth-vasudev commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/815#discussion_r86498129
  
    --- Diff: core/sql/executor/ex_sort.h ---
    @@ -356,4 +363,119 @@ class ExSortFromTopPrivateState : public 
ex_tcb_private_state
       ~ExSortFromTopPrivateState();       // destructor
     };
     
    +class ExSortBufferPool : public NABasicObject
    --- End diff --
    
    Creating a abstract class here was considered as the first option. However, 
making this change would have ripple effect all over the code since 
sql_buffer_pool is packed and unpacked when hopping many operators. If a major 
change is made to sql buffer management in future, it would be nice to consider 
having a abstract class. For now, to keep the change concise, this approach was 
taken. 


> TopN sort consumes more memory than needed.
> -------------------------------------------
>
>                 Key: TRAFODION-2326
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2326
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-exe
>    Affects Versions: 2.1-incubating
>            Reporter: Prashanth Vasudev
>            Assignee: Prashanth Vasudev
>
> Records that get discarded , those that do not belong to TopN rows, release 
> reference to the tupp descriptor, however the released tuple memory does not 
> get reused for new records from child nodes. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to