Less parallelism may be best. For example, tactical queries that engage fewer resources are more efficient. However, short queries often require more than one AMP and cannot be accommodated with single-AMP processing alone. The Optimizer looks for opportunities to transform an all-AMP query plan into a few-AMP plan. This few-AMPs approach is called Group AMP.
The Group AMP approach reduces the number of AMPs active in supporting a query and reduces the locking level from a table-level lock to one or more rowkey (specifically, partition and rowhash) locks in each AMP in the group. Removing the need for table-level locks eliminates two all-AMP steps from the query plan:
- A step to place the table-level lock on all AMPs.
- A step to remove the table-level lock from all AMPs when the query completes.