Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

sectionpage

ODXSQL - Commands

Syntax

Options

Example

 

ODXSQL

Special Characters

System Commands

Getting Help

Commands

UPDATE STATISTICS

UPDATE STATISTICS evaluates a database or table for statistical information and outputs it to three files: tables.tdf, columns.tdf, keywords.ost. By default, these files are output to the directory containing the Omnidex environment file.

The tdf (tab-delimited file) files can be opened with Microsoft Excel and ost (Omnidex Stand-Alone Table) file can be attached for further analysis.

These files contain statistical information such as cardinality, average and max lengths, and data types and lengths.

tables.tdf is a tab-delimited file in tabular format consisting of one row for each table defined in the Omnidex environment file. This file can be opened in Microsoft Excel for analysis. The statistics for each table are as follows:

  • Environment - the logical environment name as defined in the Omnidex environment file.
  • Database - the logical database name as defined in the Omnidex environment file.
  • Table - the logical table name as defined in the Omnidex environment file.
  • Columns - the number of columns in the table, including pseudo-columns defined in the Omnidex environment file.
  • Native Cols - the number or native columns in the table.
  • Pseudo Cols - the number of pseudo-columns defined in the Omnidex environment file.
  • Reclen -
  • Native Reclen -
  • ODX Reclen -
  • Cardinality - the cardinality of the table, which is the number of rows in the table.

columns.tdf is a tab-delimited file in tabular format consisting of one row for each column defined in the Omnidex environment file.

 

Syntax

UPDATE STATISTICS FOR <DATABASE database | TABLE table> [WITH options]

UPDATE STATISTICS FOR
Required

DATABASE database | TABLE table
Required. The DATABASE or TABLE keyword is required followed by the database or table name as defined in the Omnidex environment file.

WITH options
Optional. A comma separated list of options to apply to this command.

 

Options

 

 

Example

> connect pubs.env

> update statistics for table authors
Updating statistics for table AUTHORS

>

The output of tables.tdf will be in tabular format with one row for each table. The example below shows one table's statistics in columnar format because of width limitations in this html page.

Environment

PUBS_ENV

Database

PUBS

Table

AUTHORS

Columns

9

Native Cols

9

Pseudo Cols

0

Reclen

156

Native Reclen

156

ODX Reclen

156

Cardinality

25

The output of columns.tdf will be in tabular format with one row for each column. The example below shows one column's statistics in columnar format because of width limitations in this html page.

Environment

PUBS_ENV

Database

PUBS

Table

AUTHORS

Column

AU_LNAME

Datatype

C STRING

Length

41

Min Len

4

Max Len

14

Avg Len

7.36

Cardinality

23

Ratio

1.086957

The output of keywords.ost can be accessed by attaching the ost and querying it for information.

>attach ost keywords.ost as kwds
Table KSWD attached

>select * from kwds

Top