sp_iqindexsize Procedure

Gives the size of the specified index.

Syntax

sp_iqindexsize [ [ owner.] table.] index_name 

Privileges

User must be a table owner or have either the MANAGE ANY DBSPACE or ALTER ANY INDEX system privilege. Users without one of these system privileges must be granted EXECUTE permission to run the stored procedure.

Description

sp_iqindexsize columns

Column name

Description

Username

Index owner.

Indexname

Index for which results are returned, including the table name.

Type

Index type.

Info

Component of the IQ index for which the KBytes, Pages, and Compressed Pages are being reported. The components vary by index type. For example, the default (FP) index includes BARRAY (barray) and Bitmap (bm) components. The Low_Fast (LF) index includes B-tree (bt) and Bitmap (bm) components.

KBytes

Physical object size in KB.

Pages

Number of IQ pages needed to hold the object in memory.

Compressed Pages

Number of IQ pages when the object is compressed (on disk).

Returns the total size of the index in bytes and kilobytes, and an Info column that describes the component of the IQ index for which the KBytes, Pages, and Compressed Pages are reported. The components described vary by index type. For example, the default (FP) index includes BARRAY (barray) and Bitmap (bm) components. The Low_Fast (LF) index includes B-tree (bt) and Bitmap (bm) components.

Also returns the number of pages required to hold the object in memory and the number of IQ pages when the index is compressed (on disk).

You must specify the index_name parameter with this procedure. To restrict results to this index name in a single table, include owner.table. when specifying the index.

Example

sp_iqindexsize ASIQ_IDX_T780_I4_HG

Username

Indexname

Type

Info

Kbytes

Pages

Compressed Pages

GROUPO

GROUPO.Departments.ASIQ_IDX_T780_I4_HG

HG

Total

288

4

2

GROUPO

GROUPO.Departments.ASIQ_IDX_T780_I4_HG

HG

vdo

0

0

0

GROUPO

GROUPO.Departments.ASIQ_IDX_T780_I4_HG

HG

bt

152

2

1

GROUPO

GROUPO.Departments.ASIQ_IDX_T780_I4_HG

HG

garray

0

0

0

GROUPO

GROUPO.Departments.ASIQ_IDX_T780_I4_HG

HG

bm

136

2

1

GROUPO

GROUPO.Departments.ASIQ_IDX_T780_I4_HG

HG

barray

0

0

0

GROUPO

GROUPO.Departments.ASIQ_IDX_T780_I4_HG

HG

dpstore

0

0

0

GROUPO

GROUPO.Departments.ASIQ_IDX_T780_I4_HG

HG

largelob

0

0

0

GROUPO

GROUPO.Departments.ASIQ_IDX_T780_I4_HG

HG

txtPst

0

0

0

CREATE TEXT INDEX ti ON Employees( Street ) IMMEDIATE REFRESH;sp_iqindexsize 'ti';

Username

Indexname

Type

Info

KBytes

Pages

Compressed Pages

GROUPO

GROUPO.Employees.ti

TEXT

Total

896

12

6

GROUPO

GROUPO.Employees.ti

TEXT

vdo

0

0

0

GROUPO

GROUPO.Employees.ti

TEXT

bt

304

4

2

GROUPO

GROUPO.Employees.ti

TEXT

garray

152

2

1

GROUPO

GROUPO.Employees.ti

TEXT

bm

136

2

1

GROUPO

GROUPO.Employees.ti

TEXT

barray

152

2

1

GROUPO

GROUPO.Employees.ti

TEXT

dpstore

0

0

0

GROUPO

GROUPO.Employees.ti

TEXT

largelob

0

0

0

GROUPO

GROUPO.Employees.ti

TEXT

txtPst

304

4

2

Related reference
sp_iqindexmetadata Procedure
sp_iqindexfragmentation Procedure
sp_iqindexinfo Procedure