Database Manual / Reference / Database Commands

Query Plan Cache Commands查询计划缓存命令

Note

For details on a specific command, including syntax and examples, click on the link to the command's reference page.有关特定命令的详细信息,包括语法和示例,请单击指向该命令参考页面的链接。

Name名称Description描述
planCacheClearRemoves cached query plan(s) for a collection.删除集合的缓存查询计划。
planCacheClearFiltersClears index filter(s) for a collection.清除集合的索引筛选器。
planCacheListFiltersLists the index filters for a collection.列出集合的索引筛选器。
planCacheSetFilterSets an index filter for a collection.为集合设置索引筛选器。

Starting in MongoDB 8.0, use query settings instead of index filters. Index filters are deprecated starting in MongoDB 8.0. To add query settings and explore examples, see setQuerySettings.从MongoDB 8.0开始,使用查询设置而不是索引筛选器。索引筛选器从MongoDB 8.0开始就被弃用。要添加查询设置并探索示例,请参阅setQuerySettings