정의
planCacheListFilters컬렉션 의 계획 캐시 쿼리 형태 와 관련된 인덱스 필터 를 나열합니다.
반환합니다: 인덱스 필터를 나열하는 문서입니다. 출력을 참조하세요.
쿼리 설정
MongoDB 8.0 부터는 인덱스 필터 를 추가하는 대신 쿼리 설정을 사용합니다. 인덱스 필터는 MongoDB 8.0 부터 더 이상 사용되지 않습니다.
쿼리 설정에는 인덱스 필터보다 더 많은 기능이 있습니다. 또한 인덱스 필터는 영구적이지 않으며 모든 클러스터 노드에 대한 인덱스 필터를 쉽게 만들 수 없습니다. 쿼리 설정을 추가하고 예제를 탐색하려면 setQuerySettings 를 참조하세요.
호환성
이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스
중요
이 명령은 M0 및 Flex 클러스터에서 지원되지 않습니다. 자세한 내용은 지원되지 않는 명령을 참조하세요.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
구문
명령은 다음과 같은 구문을 가집니다:
db.runCommand( { planCacheListFilters: <collection> } )
명령 필드
명령에는 다음과 같은 필드가 있습니다.
필드 | 유형 | 설명 |
|---|---|---|
| 문자열 | 컬렉션의 이름입니다. |
| any | 선택 사항. 이 명령에 첨부할 사용자 제공 코멘트입니다. 설정되면 이 설명은 다음 위치에서 이 명령의 레코드와 함께 표시됩니다.
댓글은 유효한 모든 BSON types (문자열, 정수, 객체, 배열 등)이 될 수 있습니다. |
필요한 액세스 권한
사용자는 planCacheIndexFilter 조치를 포함하는 액세스 권한이 있어야 합니다.
출력
The planCacheListFilters command returns the document with the following form:
{ "filters" : [ { "query" : <query> "sort" : <sort>, "projection" : <projection>, "collation" : <collation>, "indexes" : [ <index1>, ... ] }, ... ], "ok" : 1 }
planCacheListFilters.filters인덱스 필터 정보가 포함된 문서 배열입니다.
각 문서에는 다음과 같은 필드가 포함되어 있습니다.
planCacheListFilters.filters.queryThe 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.For instance, a
querypredicate of{ "type": "electronics", "status" : "A" }covers the following query predicates:{ type: "food", status: "A" } { type: "utensil", status: "D" }
planCacheListFilters.filters.collation이 필터와 연결된 데이터 정렬 입니다. 빈 문서일 수 있습니다.
planCacheListFilters.filters.indexes계획 캐시 쿼리 형태 에 대한 인덱스 배열 입니다.
계획 캐시 쿼리 형태 는 다음 필드의 조합입니다.
To choose the best query plan, the query optimizer evaluates the
indexesand the collection scan.