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 2017/06/22 18:28:00 UTC

[jira] [Created] (TRAFODION-2667) Incorrect UEC calculation

David Wayne Birdsall created TRAFODION-2667:
-----------------------------------------------

             Summary: Incorrect UEC calculation
                 Key: TRAFODION-2667
                 URL: https://issues.apache.org/jira/browse/TRAFODION-2667
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
         Environment: All
            Reporter: David Wayne Birdsall
            Assignee: David Wayne Birdsall


When applying a predicate to histogram data for the same column, the resulting UECs are sometimes incorrect.

ColStatDesc::applySel (optimizer/ColStatDesc.cpp) calls ColStatDesc::calculateCorrectResultUec to do this UEC calculation. The latter assumes that the predicate is on a column that is independent of the histogram column. In the case that the predicate is on the same column as the histogram, it is clearly quite dependent! Instead, the UEC should be reduced proportionately in the same manner as the row count.

Though this is a simple change, the consequences may be far-reaching. Plan changes are likely. Adjustments to Optimizer tuning parameters are likely to be required. This change, then, should only be done in concert with a larger tuning effort.



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