def mysql column_stats avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL
def mysql column_stats column_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
def mysql column_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(64) PRI select,insert,update,references NEVER NULL
def mysql column_stats histogram 11 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) select,insert,update,references NEVER NULL
def mysql column_stats histogram 11 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def mysql column_stats hist_size 9 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
def mysql column_stats hist_type 10 NULL YES enum 14 42 NULL NULL NULL utf8mb3 utf8mb3_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') select,insert,update,references NEVER NULL
def mysql column_stats hist_type 10 NULL YES enum 14 42 NULL NULL NULL utf8mb3 utf8mb3_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB') select,insert,update,references NEVER NULL
def mysql column_stats max_value 5 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) select,insert,update,references NEVER NULL
def mysql column_stats min_value 4 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) select,insert,update,references NEVER NULL
def mysql column_stats nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL
CREATETABLEIFNOTEXISTStable_stats(db_namevarchar(64)NOTNULL,table_namevarchar(64)NOTNULL,cardinalitybigint(21)unsignedDEFAULTNULL,PRIMARYKEY(db_name,table_name))engine=Ariatransactional=0CHARACTERSETutf8COLLATEutf8_bincomment='Statistics on Tables';
CREATETABLEIFNOTEXISTScolumn_stats(db_namevarchar(64)NOTNULL,table_namevarchar(64)NOTNULL,column_namevarchar(64)NOTNULL,min_valuevarbinary(255)DEFAULTNULL,max_valuevarbinary(255)DEFAULTNULL,nulls_ratiodecimal(12,4)DEFAULTNULL,avg_lengthdecimal(12,4)DEFAULTNULL,avg_frequencydecimal(12,4)DEFAULTNULL,hist_sizetinyintunsigned,hist_typeenum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON'),histogramblob,PRIMARYKEY(db_name,table_name,column_name))engine=Ariatransactional=0CHARACTERSETutf8COLLATEutf8_bincomment='Statistics on Columns';
CREATETABLEIFNOTEXISTScolumn_stats(db_namevarchar(64)NOTNULL,table_namevarchar(64)NOTNULL,column_namevarchar(64)NOTNULL,min_valuevarbinary(255)DEFAULTNULL,max_valuevarbinary(255)DEFAULTNULL,nulls_ratiodecimal(12,4)DEFAULTNULL,avg_lengthdecimal(12,4)DEFAULTNULL,avg_frequencydecimal(12,4)DEFAULTNULL,hist_sizetinyintunsigned,hist_typeenum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'),histogramblob,PRIMARYKEY(db_name,table_name,column_name))engine=Ariatransactional=0CHARACTERSETutf8COLLATEutf8_bincomment='Statistics on Columns';
CREATETABLEIFNOTEXISTSindex_stats(db_namevarchar(64)NOTNULL,table_namevarchar(64)NOTNULL,index_namevarchar(64)NOTNULL,prefix_arityint(11)unsignedNOTNULL,avg_frequencydecimal(12,4)DEFAULTNULL,PRIMARYKEY(db_name,table_name,index_name,prefix_arity))engine=Ariatransactional=0CHARACTERSETutf8COLLATEutf8_bincomment='Statistics on Indexes';