Skip to main content

Abstract (Index Keyword)

Specifies that an index is abstract.


To specify that an index is abstract, use the following syntax:

Index name [ Abstract ];

Where name is the name of the index. It is useful to follow a naming convention so that indexes can be easily distinguished from properties. For example, you could include IDX at the end of all index names.


When you create a sharded table, an abstract shard key index is generated automatically and there is no need to define one.


Abstract indexes are intended for use only with sharded tables. They contain no data and thus have no storage (no index global). A sharded table has exactly one abstract index, called the shard key index. The purpose of a shard key index is to serve as the key that determines the shard in which a row resides.

If an index is defined as abstract, the index is not accessible or usable via methods or via SQL. If you also try to mark this index as unique or try to use it within a primary key, those constraints are ignored.

You cannot define an IdKey index as abstract. If you attempt to do so, a class compilation error will result.

You can use this keyword on an existing index to make it abstract. This will not delete any existing data in the index.


The default for the Abstract keyword is false.

See Also

FeedbackOpens in a new tab