Bug in Diagnostic HelpStats v15? Stats Recommendations Already Present

Database
Enthusiast

Bug in Diagnostic HelpStats v15? Stats Recommendations Already Present

I am doing some tuning of a database and queries that I have and I usually use DIAGNOSTIC HELPSTATS as a sanity check to ensure I haven't missed anything obvious, especially since some of my joins can involve many tables (dozen or less).  I've noted quite a few occassions where the recommendation is for stats that already exist (and I'm not talking about different column orders in multi-column statistics, I am talking about single column statistics being recommended for the final plan, which have already been collected). 

 

For example, I may see a recommendation for:

BEGIN RECOMMENDED STATS FOR FINAL PLAN ->

-- "COLLECT STATS COLUMN(ColA) on MyDB.MyTable"  (High Confidence)

...

<- END RECOMMENDED STATS FOR FINAL PLAN

 

However, when I look at "HELP STATS ON MyDB.MyTable", I'll see a row for the stats, their unique value counts, etc.  I tried recollecting stats on the tables(s) since their last update, just in case Teradata was thinking the stats were stale, but that didn't solve it. 

 

My fear is that these statistics are not being seen and thus, the Execution Plan being created is suboptimal.  Why does this happen?  Is Teradata in fact using the statistics to build the plan?  Is this a bug? 

 

From DBC.DBCINFO:

RELEASE 15.00.05.07

VERSION 15.00.05.09

 

  • diagnostic
  • helpstats
  • statistics
  • stats