planCacheListFilters
On this page本页内容
Definition定义
planCacheListFilters-
Lists the index filters associated with query shapes for a collection.列出与集合的查询形状关联的索引筛选器。Returns:返回值:Document listing the index filters.列出索引筛选器的文档。See Output.请参见输出。
Syntax语法
The command has the following syntax:该命令具有以下语法:
db.runCommand(
{
planCacheListFilters: <collection>
}
)
Command Fields命令字段
The command has the following fields:该命令包含以下字段:
planCacheListFilters | string | |
comment | any |
|
Required Access所需访问权限
A user must have access that includes the 用户必须具有包括planCacheIndexFilter action.planCacheIndexFilter操作的访问权限。
Output输出
The planCacheListFilters command returns the document with the following form:planCacheListFilters命令返回具有以下表单的文档:
{
"filters" : [
{
"query" : <query>
"sort" : <sort>,
"projection" : <projection>,
"collation" : <collation>,
"indexes" : [
<index1>,
...
]
},
...
],
"ok" : 1
}
planCacheListFilters.filters-
The array of documents that contain the index filter information.包含索引筛选器信息的文档数组。Each document contains the following fields:每个文档都包含以下字段:planCacheListFilters.filters.query-
The query predicate associated with this filter.与此筛选器关联的查询谓词。Although the尽管queryshows the specific values used to create the index filter, the values in the predicate are insignificant; i.e. query predicates cover similar queries that differ only in the values.query显示了用于创建索引筛选器的特定值,但谓词中的值并不重要;即查询谓词涵盖了仅在值上不同的类似查询。For instance, a例如,querypredicate of{ "type": "electronics", "status" : "A" }covers the following query predicates:{ "type": "electronics", "status" : "A" }的query谓词包含以下查询谓词:{ type: "food", status: "A" }
{ type: "utensil", status: "D" }
planCacheListFilters.filters.sort-
The sort associated with this filter. Can be an empty document.与此筛选器关联的排序。可以是空文档。
planCacheListFilters.filters.projection-
The projection associated with this filter. Can be an empty document.与此筛选器关联的投影。可以是空文档。
planCacheListFilters.filters.collation-
The collation associated with this filter. Can be an empty document.与此筛选器关联的排序规则。可以是空文档。
planCacheListFilters.filters.indexes-
The array of indexes for the query shape.查询形状的索引数组。The query shape is the combination of these fields:查询形状是以下字段的组合:To choose the best query plan, the query optimizer evaluates the要选择最佳查询计划,查询优化器将评估indexesand the collection scan.indexes和集合扫描。