> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/19/the-sql-language/parallel-query.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 第 15 章 平行查詢

**目錄**

* [15.1. 平行查詢的運作方式](https://docs.postgresql.tw/19/the-sql-language/parallel-query/how-parallel-query-works.md)
* [15.2. 何時可以使用平行查詢？](https://docs.postgresql.tw/19/the-sql-language/parallel-query/when-can-parallel-query-be-used.md)
* [15.3. 平行計畫](https://docs.postgresql.tw/19/the-sql-language/parallel-query/parallel-plans.md)
  * [15.3.1. 平行掃描](https://docs.postgresql.tw/19/the-sql-language/parallel-query/parallel-plans.md#parallel-scans)
  * [15.3.2. 平行聯結](https://docs.postgresql.tw/19/the-sql-language/parallel-query/parallel-plans.md#parallel-joins)
  * [15.3.3. 平行彙總](https://docs.postgresql.tw/19/the-sql-language/parallel-query/parallel-plans.md#parallel-aggregation)
  * [15.3.4. 平行 Append](https://docs.postgresql.tw/19/the-sql-language/parallel-query/parallel-plans.md#parallel-append)
  * [15.3.5. 平行計畫的提示](https://docs.postgresql.tw/19/the-sql-language/parallel-query/parallel-plans.md#parallel-plan-tips)
* [15.4. 平行安全性](https://docs.postgresql.tw/19/the-sql-language/parallel-query/parallel-safety.md)
  * [15.4.1. 函式與彙總函式的平行標記](https://docs.postgresql.tw/19/the-sql-language/parallel-query/parallel-safety.md#parallel-labeling)

PostgreSQL 可以設計出能運用多個 CPU 的查詢計畫，以便更快地回答查詢。這項功能稱為平行查詢（parallel query）。許多查詢無法從平行查詢中獲益，原因可能是目前實作的限制，也可能是根本想不出比循序查詢計畫更快的查詢計畫。不過，對於能夠獲益的查詢，平行查詢帶來的加速往往非常顯著。許多查詢在使用平行查詢時可以快上兩倍以上，有些查詢甚至可以快上四倍或更多。存取大量資料、但只回傳少數資料列給使用者的查詢，通常獲益最多。本章說明平行查詢如何運作的一些細節，以及在哪些情況下可以使用它，讓想要運用它的使用者能夠瞭解可以期待什麼。

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/parallel-query.html)（原文版本：18.6；核對日期：2026-09-11）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/19/the-sql-language/parallel-query.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
