db.collection.configureQueryAnalyzer()
On this page本页内容
Definition定义
db.collection.configureQueryAnalyzer(options)
-
Configures query sampling for a collection on a replica set or sharded cluster.为副本集或分片集群上的集合配置查询采样。Sampled queries provide information to采样查询为analyzeShardKey
to calculate metrics about read and write distribution of a shard key.analyzeShardKey
提供信息,以计算有关分片键的读写分布的度量。Thedb.collection.configureQueryAnalyzer()
method wraps theconfigureQueryAnalyzer
command.db.collection.configureQueryAnalyzer()
方法包装configureQueryAnalyzer
命令。Returns:返回值:A document containing fields describing the old configuration, if one exists, and fields describing the new configuration. For details, see Output.包含描述旧配置的字段(如果存在)和描述新配置的字段的文档。有关详细信息,请参阅输出。
Syntax语法
The method has the following syntax:该方法具有以下语法:
db.collection.configureQueryAnalyzer(
{
mode: <string>,
samplesPerSecond: <double>
}
)
Fields字段
db.collection.configureQueryAnalyzer()
has the following fields:具有以下字段:
mode | string | "full" or "off" ."full" 或"off" 。 | |
samplesPerSecond | double |
samplesPerSeconds 上限。 |
Access Control访问控制
For details, see configureQueryAnalyzer Access Control.有关详细信息,请参阅configureQueryAnalyzer
访问控制。
Behavior行为
For behavior, see configureQueryAnalyzer Behavior.有关行为,请参阅configureQueryAnalyzer
行为。
Output输出
For details, see configureQueryAnalyzer Output.有关详细信息,请参阅configureQueryAnalyzer
输出。
Examples实例
For examples, see configureQueryAnalyzer Examples.有关示例,请参阅configureQueryAnalyzer
示例。