バージョンごとのドキュメント一覧

11.12. インデックス使用状況の検証 #

<title>Examining Index Usage</title>

Although indexes in <productname>PostgreSQL</productname> do not need maintenance or tuning, it is still important to check which indexes are actually used by the real-life query workload. Examining index usage for an individual query is done with the <xref linkend="sql-explain"/> command; its application for this purpose is illustrated in <xref linkend="using-explain"/>. It is also possible to gather overall statistics about index usage in a running server, as described in <xref linkend="monitoring-stats"/>. PostgreSQLでは、インデックスのメンテナンスやチューニングは必要ありませんが、どのインデックスが実際の問い合わせで使われているかを確認することは、やはり重要です。 個々のコマンドでのインデックスの使用状況は、EXPLAINコマンドで検証できます。 この目的のための用例を14.1に示します。 また、28.2に示す通り、稼働中のサーバにおけるインデックス使用状況の全体的な統計情報を取り出すこともできます。

It is difficult to formulate a general procedure for determining which indexes to create. There are a number of typical cases that have been shown in the examples throughout the previous sections. A good deal of experimentation is often necessary. The rest of this section gives some tips for that: どのインデックスを作成すべきかを判断するための一般的な手順を定めることは困難です。 これまでの節では、例として典型的なケースをいくつか記述してきました。 十分な検証がしばしば必要です。 本節の残りで、検証のためのヒントをいくつか説明しておきます。