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

    https://github.com/apache/incubator-trafodion/pull/195#discussion_r46173600
  
    --- Diff: core/sql/optimizer/ScanOptimizer.cpp ---
    @@ -374,8 +399,21 @@ static NABoolean checkMDAMadditionalRestriction(const 
ColumnOrderList& keyPredsB
     
          }
        }     
    -   if(presentKeyColumns > noOfmissingKeyColumns) return TRUE;
    -   return FALSE;
    +   switch ( strategy ) {
    +     case MAJORITY_WITH_PREDICATES:
    +        return (presentKeyColumns > noOfmissingKeyColumns);
    --- End diff --
    
    I am not sure I see the point of this strategy. Suppose I have a 6 column 
key and a query with predicates on 4 columns. It makes a huge difference 
whether the predicates are on the leading columns (better) vs. the trailing 
columns (worse). This heuristic does not take the column order into account.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to