indexinfo - Return indices and statistics for database tables

Syntax

x = indexinfo(dbmeta, 'cata', 'sch', 'tab')

Description

x = indexinfo(dbmeta, 'cata', 'sch', 'tab') returns indices and statistics for:

Examples

Get index and statistics information for the table DEPT in the schema SCOTT of the catalog orcl, for dbmeta.

x = indexinfo(dbmeta,'','SCOTT','DEPT')
x = 
 Columns 1 through 8
 'orcl'  'SCOTT'  'DEPT'  '0'  'null'  'null'    '0'  '0'
 'orcl'  'SCOTT'  'DEPT'  '0'  'null'  'PK_DEPT' '1'  '1'

  Columns 9 through 13
  'null'    'null'  '4'  '1'  'null'
  'DEPTNO'  'null'  '4'  '1'  'null'

The results contain two rows, meaning there are two index columns. The statistics for the first index column appear in the following table.

ColumnDescriptionValue

1

Catalog

orcl

2

Schema

SCOTT

3

Table

DEPT

4

Non-unique: 0 if index values can be non-unique, 1 otherwise

0

5

Index catalog

null

6

Index name

null

7

Index type

0

8

Column sequence number within index

0

9

Column name

null

10

Column sort sequence

null

11

Number of rows in the index table or number of unique values in the index

4

12

Number of pages used for the table or number of pages used for the current index

1

13

Filter condition

null

For more information about the index information, see the getIndexInfo property on the Sun™ Java™ Web site at http://java.sun.com/j2se/1.4.2/docs/api/java/sql/
DatabaseMetaData.html
.

See Also

dmd, get, tables

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS