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

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

GitHub user DaveBirdsall opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1261

    [TRAFODION-1715] Improve memory use in UPDATE STATS when sample table…

    … is used
    
    UPDATE STATISTICS allocates memory for columns before deciding whether to 
create and populate a sample table. (It may turn out that creating one is 
unnecessary.)
    
    This change deallocates that memory when a sample table is created and 
populated, improving the amount of memory available for the latter. The memory 
is reallocated again once the sample table is populated.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DaveBirdsall/incubator-trafodion Trafodion1715

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1261.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1261
    
----
commit 2d2643c5c9fe93448f454554195cb23c5ebc79b9
Author: Dave Birdsall <[email protected]>
Date:   2017-10-10T19:29:50Z

    [TRAFODION-1715] Improve memory use in UPDATE STATS when sample table is 
used

----


> UPDATE STATISTICS allocates memory even when a SAMPLE table is used
> -------------------------------------------------------------------
>
>                 Key: TRAFODION-1715
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1715
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>         Environment: All
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>
> UPDATE STATISTICS attempts to use an internal sort when possible. It 
> estimates how much memory it has available to it, and estimates how much 
> memory is needed to store the sample data. It then attempts to allocate this 
> memory. If it fails to get everything it needs, it appears to retain what 
> memory it has allocated, but then runs a sample table load query. Thus, 
> memory has been allocated in the master executor process that might have been 
> useful to the load query. It would have been better perhaps to release this 
> memory, and attempted to reaquire it later.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to