After upgrading environment from Greenplum Database 7.5.x to 7.6.1, customers may observe that certain GPSS MERGE jobs become significantly slower and generate very large spill (workfile) sizes. This behavior is typically not observed in Greenplum 7.5.x with the same workload and data volume.
GPDB: 7.6.1
The performance regression is due to optimizer misestimation when GPSS uses internal temporary tables (gpsstmp_*) that lack statistics. In Greenplum 7.6.1, changes to ORCA’s handling of unanalyzed tables can lead to incorrect join direction selection, resulting in large hash spills.
Option 1: Set Globally (Recommended)
Add the following parameter to "postgresql.conf" on the Greenplum coordinator and reload the configuration: