Docs Menu

planCacheListFilters

planCacheListFilters

Lists the index filters associated with query shapes for a collection.

반환합니다:Document listing the index filters. See 출력.

이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.

  • MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스

중요

이 명령은 M0, M2 및 M5 클러스터에서 지원되지 않습니다. 자세한 내용은 지원되지 않는 명령을 참조하세요.

명령은 다음과 같은 구문을 가집니다:

db.runCommand( { planCacheListFilters: <collection> } )

planCacheListFilters 명령에는 다음 필드가 있습니다.

필드
유형
설명

planCacheListFilters

문자열

컬렉션의 이름입니다.

comment

any

선택 사항. 이 명령에 첨부할 사용자 제공 코멘트입니다. 설정되면 이 설명은 다음 위치에서 이 명령의 레코드와 함께 표시됩니다.

댓글은 유효한 모든 BSON types (문자열, 정수, 객체, 배열 등)이 될 수 있습니다.

사용자는 planCacheIndexFilter 조치를 포함하는 액세스 권한이 있어야 합니다.

The planCacheListFilters command returns the document with the following form:

{
"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.

For instance, a query predicate of { "type": "electronics", "status" : "A" } covers the following query predicates:

{ type: "food", status: "A" }
{ type: "utensil", status: "D" }

Together with the sort and the projection, the query make up the 쿼리 형태 for the specified index filter.

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 쿼리 형태 for the specified index filter.

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 쿼리 형태 for the specified index filter.

planCacheListFilters.filters.indexes

The array of indexes for this 쿼리 형태. To choose the optimal query plan, the query optimizer evaluates only the listed indexes and the collection scan.

planCacheListFilters.ok

명령의 상태입니다.

다음도 참조하세요.