ShardKey
Specifies the shard key for this class.
Usage
Until sharded classes are fully implemented, InterSystems recommends creating sharded tables from SQL, not from the object side. However, if you look at a class generated by creating a sharded table, you may see code such as the following:
/// ShardKey index for Sharded table, auto-generated by DDL CREATE TABLE statement Index ShardKey On DeptNum [ Abstract, CoshardWith = User.Department, ShardKey, SqlName = %ShardKey ];
In this example, the DeptNum property is the shard key of the current class.
See Also
-
“Horizontally Scaling InterSystems IRIS for Data Volume with Sharding” in the Scalability Guide
-
“Index Definitions” in this book
-
“Defining and Building Indices” in the SQL Optimization Guide
-
“Introduction to Compiler Keywords” in Defining and Using Classes