Describes the structure of an index definition.
An index is a structure maintained by a persistent class that is intended to be used to optimize queries and other functions. These indices are automatically maintained whenever INSERT, UPDATE, or DELETE SQL-based operations are carried out against the database; likewise for object-based actions. The SQL Query Processor makes use of available indices when preparing and executing SQL queries.
You can add index definitions to persistent classes. They are not meaningful in other kinds of classes.
An index definition has the following structure:
Index name On property_expression_list [ keyword_list ];
For example, the following class definition defines two properties and an index based on each of them:
Class MyApp.Student Extends %Persistent
Property Name As %String;
Property GPA As %Double;
Index NameIDX On Name;
Index GPAIDX On GPA;