Skip to main content

%TSQL.sys.indexes

persistent class %TSQL.sys.indexes extends %Library.Persistent

SQL Table Name: %TSQL_sys.indexes

sysindexes contains one row for each clustered index (IDKey index), one row for each nonclustered index (all other indexes), one row for each table that has no clustered index, and one row for each table that contains text or image columns.

Property Inventory

Parameters

parameter READONLY = 1;
Inherited description: READONLY = 1 means that objects can be created, opened but not saved or deleted. Tables are projected to SQL as READONLY.

Properties

property doampg as %Integer;
Page number for the object allocation map of a table
Property methods: doampgDisplayToLogical(), doampgGet(), doampgIsValid(), doampgLogicalToDisplay(), doampgNormalize(), doampgSet()
property id as %Integer [ Required ];
ID of a table, or ID of table to which index belongs
Property methods: idDisplayToLogical(), idGet(), idIsValid(), idLogicalToDisplay(), idNormalize(), idSet()
property indexfields as list of %String (MAXLEN = 128) [ SqlFieldName = index_fields ];
List of fields in the index. NULL for indid = 0 and 255
Property methods: indexfieldsBuildValueArray(), indexfieldsCollectionToDisplay(), indexfieldsCollectionToOdbc(), indexfieldsDisplayToCollection(), indexfieldsDisplayToLogical(), indexfieldsGet(), indexfieldsGetObject(), indexfieldsGetObjectId(), indexfieldsGetSwizzled(), indexfieldsIsValid(), indexfieldsLogicalToDisplay(), indexfieldsLogicalToOdbc(), indexfieldsNormalize(), indexfieldsOdbcToCollection(), indexfieldsSet(), indexfieldsSetObject(), indexfieldsSetObjectId()
property indid as %SmallInt [ Required ];
0 if a table; 1 if a clustered index on an allpages-locked table; >1 if a nonclustered index or a clustered index on a data-only-locked table; 255 if text, image or Java off-row structure (LOB structure)
Property methods: indidDisplayToLogical(), indidGet(), indidIsValid(), indidLogicalToDisplay(), indidNormalize(), indidSet()
property ioampg as %Integer;
Page number for the allocation map of an index or (LOB structure)
Property methods: ioampgDisplayToLogical(), ioampgGet(), ioampgIsValid(), ioampgLogicalToDisplay(), ioampgNormalize(), ioampgSet()
property keycnt as %SmallInt;
Number of keys for a clustered index on an allpages-locked table; number of keys, plus 1 for all other indexes
Property methods: keycntDisplayToLogical(), keycntGet(), keycntIsValid(), keycntLogicalToDisplay(), keycntNormalize(), keycntSet()
property name as %String (MAXLEN = 128);
Index or table name
Property methods: nameDisplayToLogical(), nameGet(), nameIsValid(), nameLogicalToDisplay(), nameLogicalToOdbc(), nameNormalize(), nameSet()
property parentobjname as %String (MAXLEN = 128) [ SqlFieldName = parent_obj_name ];
Parent Object name Object name of the parent_obj.
Property methods: parentobjnameDisplayToLogical(), parentobjnameGet(), parentobjnameIsValid(), parentobjnameLogicalToDisplay(), parentobjnameLogicalToOdbc(), parentobjnameNormalize(), parentobjnameSet()
property schema as %String (MAXLEN = 128);
Name of the schema the column resides in
Property methods: schemaDisplayToLogical(), schemaGet(), schemaIsValid(), schemaLogicalToDisplay(), schemaLogicalToOdbc(), schemaNormalize(), schemaSet()
property status as %SmallInt;
Internal system status information Decimal Hex Status 1 0x1 Index supports foreign key constraint 2 0x2 Index supports primary key/unique declarative constraint 4 0x4 Index includes an IDENTITY column 8 0x8 Constraint name not specified 16 0x10 Large I/Os (prefetch) not enabled for table, index, or text chain 32 0x20 MRU cache strategy not enabled for table, index, or text chain 64 0x40 Ascending inserts turned on for the table 256 0x0100 Index is presorted and does not need to be copied to new extents 512 0x0200 Table is a data-only-locked table with a clustered index 8192 0x2000 Index on a data-only-locked table is suspect
Property methods: statusDisplayToLogical(), statusGet(), statusIsValid(), statusLogicalToDisplay(), statusNormalize(), statusSet()
property status2 as %Integer;
Internal system status information Decimal Hex Status 1 0x1 Abort current command or trigger if attempt to insert duplicate key 2 0x2 Unique index 4 0x4 Abort current command or trigger if attempt to insert duplicate row; always 0 for data-only-locked tables 16 0x10 Clustered index 64 0x40 Index allows duplicate rows, if an allpages-locked table; always 0 for data-only-locked tables 128 0x80 Sorted object; not set for tables without clustered indexes or for text objects 512 0x200 sorted data option used in create index statement 2048 0x800 Index on primary key 32768 0x8000 Suspect index; index was created under another sort order
Property methods: status2DisplayToLogical(), status2Get(), status2IsValid(), status2LogicalToDisplay(), status2Normalize(), status2Set()

Indexes

index (IDKEYIndex on id,indid) [IdKey, Type = key, Unique];
Index methods: IDKEYIndexCheck(), IDKEYIndexDelete(), IDKEYIndexExists(), IDKEYIndexOpen(), IDKEYIndexSQLCheckUnique(), IDKEYIndexSQLExists(), IDKEYIndexSQLFindPKeyByConstraint(), IDKEYIndexSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: CacheSQLStorage

Maps: 2

  • Map number 1 is named Master

    thismap.Global: ^oddTSQL

  • Map number 2 is named SchemaNameIndex

    thismap.Global: ^oddSQL

  • ^oddTSQL({id},"idx",{indid})
    =
    Node Delimiter Piece Name
    1 schema
    2 parent_obj_name
    3 name
    4 doampg
    5 ioampg
    6 status2
    7 status
    8 keycnt
    9 index_fields
    ^oddSQL({schema},{parent_obj_name},"tsql",1,{id},"idx",{indid})
    =
FeedbackOpens in a new tab