Question regarding automatic histogram creation
I am working in a 12.1 Oracle database. I am trying to understand how the automatic histogram creation mechanism works.
I create a table with < 254 NDVs and I make sure it's uniform data distribution, i.e. not skewed. I then run select * from table where col=b, to populate the SYS.COL_USAGE$ data dictionary table and then I collect stats using the DBMS_STATS and all default options.
After that I see in the DBA_TAB_COL_STATISTICS view that a FREQUENCY histogram is automatically created, but there is no skew. I tried multiple data distribution combinations and always FREQUENCY. So I decided to insert more than 254 NDVs into one of this table's columns which are skewed and Oracle then automatically creates HYBRID histogram type, ok that's fine. Then I make that table data not skewed and I get NONE for histogram. So I get what I expect when NDV are more than 254 in the table, i.e. I get a histogram automatically created when the data is skewed and