Index catalog table OA_STATISTICS
- Last Updated: May 12, 2026
- 3 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
The OA_STATISTICS table is stored in STAT.CSV and contains the table index statistics that the OpenAccess SDK SQL engine uses to determine the best query execution plan and to support the SQLStatistics ODBC call. The OA_STATISTICS table contains one row for every column that has an index on it and additional rows for table statistics. It is accessed from ODBC with the SQLStatistics call.
Only the columns marked with an asterisk are required by the OpenAccess SDK SQL engine. Other columns may be required by the client application. For example, Microsoft Access will give an ODBC conformance error if all required columns are not set. To enable your IP to be accessed from Microsoft Access, you need all the columns indicated with * in the following table. Set the other columns to null. Please contact us for the latest information on special needs of other applications.
Note: When a table has multiple unique indexes, the Primary Index (or the best index) should be returned first. When the OpenAccess SDK SQL engine needs the primary index of a table, it picks up the first unique index from the OA_STATISTICS. Note that in the case of Dynamic Schema, the IP should return the Primary index information first in the list of schema objects.
The OpenAccess SDK SQL engine currently uses the Primary Index exposed in OA_FKEYS for a few operations, only when a unique index is not found in OA_STATISTICS. The OA_FKEYS information is primarily used for returning Primary key information to client applications (for example, ODBC API SQLPrimaryKeys).
Definition of Index catalog table OA_STATISTICS
| Column Name | Type | Len | Description |
| TABLE_QUALIFIER* | WVARCHAR | 128 | The name of the database in which the table falls. It can be used to distribute tables into physically different databases. SCHEMA is normally used. The entry here is the same you use in OA_COLUMNS and OA_TABLES. |
| TABLE_OWNER* | WVARCHAR | 128 | The owner of the table. It is normally set to system or user. SYSTEM—the table is managed by the OpenAccess SDK SQL engine. OAUSER—the table is managed by the IP. In future releases, this entry will be used to control access rights to the table and will represent the actual user who owns the table. The entry here and in the OA_COLUMNS must match. |
| TABLE_NAME* | WVARCHAR | 128 | Name of the table. This is how the end user will refer to it. |
| NON_UNIQUE* | SMALLINT | Indicates whether the index prohibits duplicate values: |
|
| INDEX_QUALIFIER | WVARCHAR | 128 | Name of the database to which the table belongs. |
| INDEX_NAME* | WVARCHAR | 128 | Name of the index: NULL (empty) if TYPE is SQL_TABLE_STAT |
| OA_TYPE* | SMALLINT | Type of information being returned. Should be set to 1-3 for Microsoft Access to pick up the indexes: |
|
| SEQ_IN_INDEX* | SMALLINT | Column sequence number in index (starting with 1) Set to NULL if TYPE is SQL_TABLE_STAT. This value is 1 if only one column makes up an index. |
|
| COLUMN_NAME* | WVARCHAR | 128 | Column identifier; set to NULL if TYPE is SQL_TABLE_STAT. |
| OA_COLLATION | WVARCHAR | 1 | Collation sequence: |
| OA_CARDINALITY | INTEGER | Cardinality of the table or index. Used by the OpenAccess SDK SQL engine to pick an optimal index if this is not a unique index. |
|
| OA_PAGES | INTEGER | Reserved for future use. The number of pages used to store the index or table. |
|
| FILTER_CONDITIONS | WVARCHAR | 128 | Leave blank to indicate NULL value. |
| To enable your IP to be accessed from Microsoft Access, you need all the columns indicated with *. Set the other columns to null. | |||