Skip to main content

This documentation is for an older version of this product. See the latest version of this content.Opens in a new tab

CoshardWith (Index Keyword)

Specifies the name of the class with which this class is cosharded.

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 current class is cosharded with the User.Department class.

See Also

FeedbackOpens in a new tab