Table definitions, for both system and applications tables, are stored in the _File table. Index definitions are stored in _Index. Each table and index has a unique number that identifies it.
CRUD (Create/Read/Update/Delete) statistics for tables and indexes are written to the statistics virtual system tables (VSTs). Database-wide statistics, since the DB was opened, are written to the _TableStat and _IndexStat VSTs. Per-user statistics, for the users who are currently logged in, are written to the _UserTableStat and _UserIndexStat VSTs. Each record in these VSTs contains a table number or index number; you can use this number to query the related _File or _Index record to get the name of the object.
These VSTs don't necessarily contain records for all tables and indexes. You use the statistics startup parameters to determine which objects will have CRUD stats in the statistics VSTs. In other words, the values of these parameters determine how many records these tables contain, and also what their starting points are.
The default values of -basetable and -baseindex are 1; they correspond to a table number and an index number. The defaults for -tablerangesize and -indexrangesize are 50. They tell the database how many contiguous object numbers should have their statistics tracked. With these defaults, you will have access to statistics for tables 1 through 50 (if they exist) and indexes 1 through 50. So if you actually had 55 tables in your database, numbered 1 through 55, you would have no statistics for tables 51 to 55.
Typically you would leave the values of -basetable and -baseindex at their defaults, assuming you only want statistics for application objects. Application table numbers start at 1; application index numbers start at 8. If you use the defaults for those then you would want to set -tablerangesize to at least the number of the highest-numbered table, and -indexrangesize to at least the highest index number.
To find these numbers:
Code:
find last dictdb._file no-lock where _file._tbl-type = "T" use-index _file-number no-error.
find last dictdb._index no-lock where not _index._index-name begins "_" use-index _index-number no-error.
display _file._file-number _index._idx-num.
Depending on how much your schema changes and how often you restart your database you might want to set the *rangesize parameters higher than you need. If you do that then newly-added tables or indexes, created via online schema changes, will have available statistics without having to restart the database.