You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "David Wayne Birdsall (JIRA)" <ji...@apache.org> on 2015/10/05 21:01:26 UTC

[jira] [Resolved] (TRAFODION-1494) UPDATE STATS sample table population query gets serial plan

     [ https://issues.apache.org/jira/browse/TRAFODION-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Wayne Birdsall resolved TRAFODION-1494.
---------------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 2.0-incubating)
                   1.2-incubating

Verified that it is fixed in the current code base.

> UPDATE STATS sample table population query gets serial plan
> -----------------------------------------------------------
>
>                 Key: TRAFODION-1494
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1494
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 1.1 (pre-incubation)
>         Environment: All
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>             Fix For: 1.2-incubating
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> If a table is large enough so that sample data does not fit in memory, UPDATE STATS will create a table and use an UPSERT or LOAD statement to load it with a sample of the table of interest. The query plan being generated for this UPSERT/LOAD is a serial plan which is quite slow. It should generate a parallel plan.
> The problem is in CmpSeabaseDDL::restoreAllControlsAndFlags. We set a bunch of CQDs for metadata queries so their plans are not affected by any user CQDs. The procedure CmpSeabaseDDL::restoreAllControlsAndFlags is in charge of restoring the CQDs afterward, but fails to.
> One of the CQDs that fails to get reset is "attempt_esp_parallelism". It is turned OFF for the metadata queries. Since it does not get reset, all plans afterward (including sample table population) are serial.
> The bug is in the following statement in CmpSeabaseDDL::restoreAllControlsAndFlags:
>   if (CmpCommon::context()->getCntlCount() > 0 &&
>       CmpCommon::context()->getCntlCount() < CQD_SENT_MAX)
> The "<" should be a "<=". (Off-by-one bug.)



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