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

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

Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/815#discussion_r86410563
  
    --- Diff: core/sql/executor/ex_sort.cpp ---
    @@ -183,6 +212,11 @@ ExSortTcb::ExSortTcb(const ExSortTdb & sort_tdb,
       processedInputs_ = qparent_.down->getTailIndex();
       workAtp_ = allocateAtp(sort_tdb.workCriDesc_, space);
       workAtp_->getTupp(2) = new(space) tupp_descriptor();
    +  
    +  //buffer pools are allocated in SORT_PREP work phase.
    +  topNSortPool_ = NULL;
    +  regularSortPool_ = NULL;
    +  partialSortPool_ = NULL;
    --- End diff --
    
    Should we set sortPool_ to NULL here also?


> 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