- Reference >
- Database Commands >
- Query Plan Cache Commands >
- planCacheListFilters
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:
Command Fields¶
The command has the following fields:
Field | Type | Description |
---|---|---|
planCacheListFilters |
string | The name of the collection. |
comment |
any | Optional. A user-provided comment to attach to this command. Once set, this comment appears alongside records of this command in the following locations:
A comment can be any valid BSON type (string, integer, object, array, etc). New in version 4.4. |
Required Access¶
A user must have access that includes the
planCacheIndexFilter
action.
Output¶
The planCacheListFilters
command returns the document with
the following form:
-
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.For instance, a
query
predicate of{ "type": "electronics", "status" : "A" }
covers the following query predicates:
-
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
indexes
and the collection scan.
-
-
planCacheListFilters.
ok
¶ The status of the command.
See also