Parallel index builds
Index builds can take advantage of PDQ and can be parallelized. The database server performs both scans and sorts in parallel for index builds.
The following operations initiate index builds:
- Create an index.
- Add a unique, primary key.
- Add a referential constraint.
- Enable a referential constraint.
When PDQ is in effect, the scans for index builds are controlled by the PDQ configuration parameters described in The allocation of resources for parallel database queries.
If you have a computer with multiple CPUs, the database server uses two sort threads to sort the index keys. The database server uses two sort threads during index builds without the user setting the PSORT_NPROCS environment variable.