Access to a Database's Statistics
The database distribution statistics are stored in a database named sysstats
which is stored on the TFS in the same directory where the root directories (e.g., bookshop.rdm
) are located. The database definition for sysstats
is shown below followed by descriptions for each of the four tables. You can easily view the contents of this database by simply opening it and executing SELECT statements against it. We do not recommend executing any INSERT, UPDATE or DELETE statements against it!
create table sysdbstats( dbname varchar(128) primary key, lastrun date not null, exectime double not null, rowtot uint64 not null, autopct uint16 not null, automin uint32 not null, histosize uint16 not null, samplepct uint16 not null, samplemin uint32 not null, samplemax uint32 not null, notabs uint16 not null ); create table systabstats( tabrid rowid primary key, tabname varchar(128) not null, tabnum uint32 not null, norows uint64 not null, nosampled uint32 not null, nocols uint16 not null, dbname varchar(128) not null references sysdbstats on delete cascade ); create table syscolstats( colrid rowid primary key, colname varchar(128) not null, colnum uint32 not null, data_type int16 not null, prec uint16 not null, emultAvg double not null, emultNv double not null, nodistinct uint16 not null, nonulls uint32 not null, tabrid rowid not null references systabstats on delete cascade ); create table syscolval( eq_total uint32 not null, ne_total uint32 not null, val varchar(128) not null, colrid rowid not null references syscolstats on delete cascade );