db.collection.configureQueryAnalyzer()
定義
db.collection.configureQueryAnalyzer(options)
レプリカセットまたはシャーディングされたクラスター上のコレクションのクエリ サンプリングを構成します。 サンプリングされたクエリは、シャードキーの読み取りと書込みの分布に関するメトリクスを計算するための情報を
analyzeShardKey
に提供します。db.collection.configureQueryAnalyzer()
メソッドは、configureQueryAnalyzer
コマンドをラップします。次の値を返します。 A document containing fields describing the old configuration, if one exists, and fields describing the new configuration. For details, see 出力.
互換性
このメソッドは、次の環境でホストされている配置で使用できます。
MongoDB Atlas はクラウドでの MongoDB 配置のためのフルマネージド サービスです
重要
このコマンドは、M0、M2、M5、および Flex クラスターではサポートされていません。詳細については、「 サポートされていないコマンド 」を参照してください。
MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン
MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン
構文
このメソッドの構文は次のとおりです。
db.collection.configureQueryAnalyzer( { mode: <string>, samplesPerSecond: <double> } )
フィールド
db.collection.configureQueryAnalyzer()
には次のフィールドがあります:
フィールド | タイプ | 必要性 | 説明 |
---|---|---|---|
| string | 必須 | クエリ アナライザが実行されるモード。 |
| double | 任意 | 1 秒あたりのサンプル数。
For details, see samplePerSeconds の上限. |
アクセス制御
For details, see configureQueryAnalyzer Access Control.
動作
For behavior, see configureQueryAnalyzer Behavior.
出力
For details, see configureQueryAnalyzer Output.
例
For examples, see configureQueryAnalyzer Examples.