Gopal V created HIVE-21343:
------------------------------

             Summary: CBO: CalcitePlanner debug logging is expensive and costly
                 Key: HIVE-21343
                 URL: https://issues.apache.org/jira/browse/HIVE-21343
             Project: Hive
          Issue Type: Bug
          Components: CBO
    Affects Versions: 4.0.0
            Reporter: Gopal V
         Attachments: Reloptutil-toString.png

{code}
      //Remove subquery
      LOG.debug("Plan before removing subquery:\n" + 
RelOptUtil.toString(calciteGenPlan));
      calciteGenPlan = hepPlan(calciteGenPlan, false, 
mdProvider.getMetadataProvider(), null,
              new HiveSubQueryRemoveRule(conf));
      LOG.debug("Plan just after removing subquery:\n" + 
RelOptUtil.toString(calciteGenPlan));

      calciteGenPlan = HiveRelDecorrelator.decorrelateQuery(calciteGenPlan);
      LOG.debug("Plan after decorrelation:\n" + 
RelOptUtil.toString(calciteGenPlan));
{code}

The LOG.debug() consumes more CPU than the actual planner steps.

 !Reloptutil-toString.png! 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to