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

第15章 パラレルクエリ

目次

15.1. パラレルクエリはどのように動くのか
15.2. どのような時にパラレルクエリは使用できるのか?
15.3. パラレルプラン
15.3.1. パラレルスキャン
15.3.2. パラレルジョイン
15.3.3. パラレル集約
15.3.4. パラレルアペンド
15.3.5. パラレルプランに関するヒント
15.4. パラレル安全
15.4.1. 関数と集約のためのパラレルラベル付け
<title>Parallel Query</title>

<productname>PostgreSQL</productname> can devise query plans that can leverage multiple CPUs in order to answer queries faster. This feature is known as parallel query. Many queries cannot benefit from parallel query, either due to limitations of the current implementation or because there is no imaginable query plan that is any faster than the serial query plan. However, for queries that can benefit, the speedup from parallel query is often very significant. Many queries can run more than twice as fast when using parallel query, and some queries can run four times faster or even more. Queries that touch a large amount of data but return only a few rows to the user will typically benefit most. This chapter explains some details of how parallel query works and in which situations it can be used so that users who wish to make use of it can understand what to expect. PostgreSQLは、クエリの応答をより速くするために、複数のCPUを活用するクエリプランを生成することができます。 この機能は、パラレルクエリとして知られています。 多くのクエリはパラレルクエリの恩恵にあずかることができません。 その理由は、現在の実装の制限によるもの、あるいは直列にクエリを実行するよりも速いと思われるクエリプランが存在しないため、のどちらかです。 しかし、パラレルクエリの恩恵にあずかることのできるクエリでは、パラレルクエリによる高速化は、しばしばかなりのものとなります。 多くのクエリではパラレルクエリを使用すると2倍以上速くなり、中には4倍かそれ以上に速くなるものもあります。 大量のデータにアクセスするが、返却する行が少ないクエリが典型的には最大の恩恵にあずかります。 この章では、パラレルクエリの利用を希望しているユーザが、そこから何が期待できるのかを理解できるようにするために、パラレルクエリの動作の詳細と、どのような状況でユーザがパラレルクエリを使用できるのか説明します。