Assists in performance tuning by reporting the number of levels in an index.
sa_index_levels( [ tbl_name [, owner_name ] ] )
tbl_name Use this optional CHAR(128) parameter to specify the table name.
owner_name Use this optional CHAR(128) parameter to specify the owner name.
Column name | Data type | Description |
---|---|---|
TableName | CHAR(128) | The name of a table. |
TableId | UNSIGNED INTEGER | The table ID. |
IndexName | CHAR(128) | The name of an index. |
IndexId | UNSIGNED INTEGER |
The index ID. This column contains one of the following:
|
IndexType | CHAR(4) |
The index type. This column contains one of the following values:
|
Levels | INTEGER | The number of levels in the index. |
The number of levels in the index tree determines the number of I/O operations needed to access a row using the index. Indexes with a few levels are more efficient than indexes with a large number of levels.
The procedure returns a result set containing the table name, the table ID, the index name, the index ID, the index type, and the number of levels in the index.
If no arguments are supplied, levels are returned for all indexes in the database. If only tbl_name is supplied, levels for all indexes on that table are supplied. If tbl_name is NULL and an owner_name is given, only levels for indexes on tables owned by that user are returned.
DBA authority
None
The following example uses the sa_index_levels system procedure to return the number of levels in the Products index.
CALL sa_index_levels( ); |
TableName | TableId | IndexName | ... | Levels |
---|---|---|---|---|
Products | 436 | Products | ... | 1 |
... | ... | ... | ... | ... |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |