System table table_statistics is missing column "table_schema"
System table table_statistics is missing column "table_schema" in v 12.0.3.
Here is explanation why do I care about missing column in system table.
Doing some random query tuning, I found that small table is reporting as having no statistics, or PREDICATE VALUE OUT OF RANGE.
Investigation show, that small table is reloaded daily, by truncating and inserting full data.
It appears that table truncate is invalidating table statistics, and I completely agree with it. I advised user to analyse table after full data reload.
Now there is a question how to detect tables that has invalidated statistics, to make sure all ETL are properly collect statistics. Fortunately, Vertica has system table table_statistics. It contains number of rows. If no statistics has been collected, or table has been truncated, number of rows is set to 1.
That would be perfect solution to find all tables with invalidated statistics.
Unfortunately, system table table_statistics is missing column "table_schema" and has only table_name. That makes detection of tables with invalidated statistics slightly inconvenient, some tables have same name in several schemes.
Can you take a look in system view definition, and post here query using internal views, that will show missing table_schema column.
May be, you can just write SQL that is using internal views that will show tables where statistics has been invalidated. That is actually what is needed. Probably a good idea in next Vertica release to add bool column to table_statistics - invalidated_statistics.