On this page本页内容
planCacheListFilters
Lists the index filters associated with query shapes for a collection.列出与集合的查询形状关联的索引筛选器。
The command has the following syntax:该命令具有以下语法:
db.runCommand( { planCacheListFilters: <collection> } )
The planCacheListFilters
command has the following field:planCacheListFilters
命令具有以下字段:
planCacheListFilters | string | |
comment | any |
|
A user must have access that includes the 用户必须具有包含planCacheIndexFilter
action.planCacheIndexFilter
操作的访问权限。
The planCacheListFilters
command returns the document with the following form:planCacheListFilters
命令返回具有以下格式的文档:
{ "filters" : [ { "query" : <query> "sort" : <sort>, "projection" : <projection>, "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 尽管query
shows 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 例如,query
predicate of { "type": "electronics", "status" : "A" }
covers the following query predicates:{ "type": "electronics", "status" : "A" }
的query
谓词包含以下查询谓词:
{ type: "food", status: "A" } { type: "utensil", status: "D" }
Together with the sort
and the projection
, the query
make up the query shape for the specified index filter.query
与sort
和projection
一起构成指定索引筛选器的查询形状。
planCacheListFilters.filters.sort
The sort associated with this filter. 与此筛选器关联的排序。Can be an empty document.可以是空文档。
Together with the query
and the projection
, the sort
make up the query shape for the specified index filter.sort
与query
和projection
一起构成指定索引筛选器的查询形状。
planCacheListFilters.filters.projection
The projection associated with this filter. 与此筛选器关联的投影。Can be an empty document.可以是空文档。
Together with the query
and the sort
, the projection
make up the query shape for the specified index filter.projection
与query
和sort
一起构成指定索引筛选器的查询形状。
planCacheListFilters.filters.indexes
The array of indexes for this query shape. 此查询形状的索引数组。To choose the optimal query plan, the query optimizer evaluates only the listed 为了选择最佳的查询计划,查询优化器只评估列出的索引和集合扫描。indexes
and the collection scan.