Home | Previous Page | Next Page   Appendix B. How SQL Queries Are Executed > When Parallel Processing Occurs >

Parallel Sorts

The optimizer can use parallel sorts for any query. Parallel sorts can occur both when the query executes on a single coserver and when the query executes across multiple coservers.

Query Execution on a Single Coserver

When a query executes on a single coserver, the optimizer can allocate parallel sort threads in the following circumstances:

Query Execution on Multiple Coservers

Parallel sorts occur even when PDQPRIORITY is not set. If the data to be sorted resides on different coservers, the optimizer creates one sort thread for each CPU virtual processor unless the SET ENVIRONMENT COMPUTE_QUOTA has been set to ON for the session.

The optimizer can use parallel sorts for any query when the following conditions occur:

Other Sort Operations

Parallel sorts are not limited to queries with a PDQpriority value greater than 0. Other database operations, such as UPDATE STATISTICS and nonfragmented or detached index builds, also use parallel sorts.

When PDQPRIORITY is greater than 0,queries and other SQL statements with sort operations benefit both from additional parallel sorts.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]