On this page
planCacheListFilters
在本页面
Definition
planCacheListFilters
- 2.6 版的新功能。
列出与query shapes关联的集合的index filters。
该命令具有以下语法:
db.runCommand( { planCacheListFilters: <collection> } )
planCacheListFilters命令具有以下字段:
Field | Type | Description |
---|---|---|
planCacheListFilters |
string | 集合的名称。 |
Returns: | 列出索引过滤器的文档。参见Output。 |
---|
Required Access
用户必须具有包括planCacheIndexFilter
操作的访问权限。
Output
planCacheListFilters命令以以下形式返回文档:
{
"filters" : [
{
"query" : <query>
"sort" : <sort>,
"projection" : <projection>,
"indexes" : [
<index1>,
...
]
},
...
],
"ok" : 1
}
planCacheListFilters.
filters
- 包含索引过滤器信息的文档数组。
每个文档包含以下字段:
planCacheListFilters.filters.
query
- 与此过滤器关联的查询谓词。尽管query显示了用于创建索引过滤器的特定值,但谓词中的值无关紧要;即查询谓词涵盖仅值不同的类似查询。
例如,一个{ "type": "electronics", "status" : "A" }
的query谓词涵盖以下查询谓词:
{ type: "food", status: "A" }
{ type: "utensil", status: "D" }
query与sort和projection一起构成指定索引过滤器的query shape。
planCacheListFilters.filters.
sort
- 与此过滤器关联的排序。可以是空文件。
sort与query和projection一起构成指定索引过滤器的query shape。
planCacheListFilters.filters.
projection
- 与此过滤器关联的投影。可以是空文件。
projection与query和sort一起构成指定索引过滤器的query shape。
planCacheListFilters.filters.
indexes
- 此query shape的索引数组。要选择最佳查询计划,查询优化器仅评估列出的
indexes
和集合扫描。
- 此query shape的索引数组。要选择最佳查询计划,查询优化器仅评估列出的
planCacheListFilters.
ok
- 命令的状态。
See also