Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hive Explain says "Plan not optimized by CBO due to missing statistics" but stats are present. What gives?

avatar
Rising Star

I'm running an explain on a query and the result includes "Plan not optimized by CBO due to missing statistics. Please check log for more details"

1. All the tables in the query have had compute statistics run on them and the describe formatted output shows that stats are present and up to date. What is missing?

2. Which log file is the message referring to? I looked in Hive the hiveserver2.log and can see the log entries for the explain command here but there's no explanation on what stats it thinks are missing.

12 REPLIES 12

avatar

@Artem Ervits, done, please check if it's clear now.

avatar
New Contributor

Hey guys! i am running into the same problem. When I look for stats for a specific column it showing me all other fileds like min, max etc as blank My column level stats are showing as blank. And when I take the plan on the query involving these tables i am getting the warning as Column stats = None Please help!

avatar
Super Collaborator

the answer was given by Guilherme Braccialli .

in your /tmp/<user>/hive.log you would see a message like this

2017-06-28 10:04:43,717 INFO  [main]: parse.BaseSemanticAnalyzer (CalcitePlanner.java:canCBOHandleAst(397)) - Not invoking CBO because the statement has too few joins