[ https://issues.apache.org/jira/browse/TRAFODION-2326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633734#comment-15633734 ]
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_r86411525 --- 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 -- A more object-oriented way to do this is to create a class hierarchy, with ExSortBufferPool as the abstract base class, and two specializations, one for simple buffers and the other for SQL buffers. Then all your methods are virtual and you get rid of all the "if (sqlBufferPool_)" checks. The code will be slightly more efficient too though probably not significantly so. > 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)