使用 “版本 ”下拉列表切换服务。 了解有关导航的详细信息。
适用于: ✅ Azure 数据资源管理器
注释
此功能目前处于预览阶段。 正式发布之前,功能和语法可能会更改。
策略 snapshot_indexing 控制如何为图形模型编制图形快照编制索引。
策略会影响设置策略后创建的快照。 它不会更改现有快照。
默认值IndexingLevel为 Default 。
索引可以提高查询性能,但更完整的索引可以增加准备快照所需的工作。 索引在后台运行,因此在索引工作正在进行时,图形查询可以继续使用可用的快照。 若要控制默认图形查询是否等待索引快照,请使用 graph_query 策略。
Permissions
若要显示策略,需要 数据库监视器或数据库查看器权限。
若要更改或删除策略,需要对图形模型拥有 Graph 管理员权限。
Syntax
.show
graph_model
GraphModelNamepolicysnapshot_indexing
.show
graph_model
*
policy
snapshot_indexing
.alter
graph_model
GraphModelNamepolicysnapshot_indexingPolicyObject
.delete
graph_model
GraphModelNamepolicysnapshot_indexing
Parameters
| Name | 类型 | Required | Description |
|---|---|---|---|
| GraphModelName | String | ✅ | 图形模型名称。 |
| PolicyObject | String |
✅ 用于 .alter |
一个 JSON 策略对象。 |
IndexingLevel |
String | ✅ | 请求的索引级别。 支持的值为 Disabled、Default 和 Best。 |
索引级别
| 索引级别 | Description |
|---|---|
Disabled |
不要为模型为图形快照编制索引。 |
Default |
让系统确定索引是否对每个快照有利。 这是默认值。 |
Best |
对模型的快照使用最完整的索引行为。 这可以提高查询性能,但在准备快照时可能需要更多工作。 |
删除策略会还原默认行为。
Returns
此命令返回具有以下列的表:
| 列 | 类型 | Description |
|---|---|---|
| PolicyName | String | 策略名称。 |
| 实体名称 | String | 图形模型名称。 |
| Policy | String | 策略的 JSON 表示形式。 |
| ChildEntities | String | 保留。 |
| EntityType | String | 实体类型。 |
Examples
显示图形模型的策略
.show graph_model MyGraph policy snapshot_indexing
显示所有图形模型的策略
.show graph_model * policy snapshot_indexing
使用默认索引行为
.alter graph_model MyGraph policy snapshot_indexing ```
{
"IndexingLevel": "Default"
}
```
使用最完整的索引行为
.alter graph_model MyGraph policy snapshot_indexing ```
{
"IndexingLevel": "Best"
}
```
禁用快照索引
.alter graph_model MyGraph policy snapshot_indexing ```
{
"IndexingLevel": "Disabled"
}
```
删除策略
.delete graph_model MyGraph policy snapshot_indexing