This topic describes the restrictions on parallel query and how to use parallel query.
Restrictions on parallel query
Parallel query cannot improve performance in the following situations:
- The number of table entries is less than 20,000.
- System tables or temporary tables
- SELECT... FOR UPDATE and SELECT... FOR SHARE statements
- Queries on a full-text indexed table
- Stored procedures
- User defined functions (UDFs)
- Recursive CTEs
- Window functions
- XML functions
- GROUP BY WITH ROLLUP
- Locking functions
- Non-B-tree indexes
- INDEX MERGE
- Queries for serializable transactions
- The number of parallel threads is equal to or more than four times the number of CPU cores.