Installing GPORCA
GPORCA scales out the planning and optimization capabilities of the traditional Greenplum optimizer. Being scalable, GPORCA achieves better performance in a multi-core environment. GPORCA is used by Greenplum to generate query plans by default.
GPORCA 3.1.0 is recommended for Greenplum 5.11.3, and GPORCA 3.65.3 is recommended for Greenplum 6.0.0. If Greenplum 6.12.1 is installed, you do not need to install GPORCA. This section uses GPORCA 3.1.0 as an example.
- Go to the directory.
cd /opt/tool
- Download the GPORCA source code and upload it to /opt/tool.
Download link of the GPORCA source code : https://gitee.com/Mr.Lin/gporca/tree/v3.1.0
- Modify the CStackDescriptor.cpp configuration file.
- Open the file.
vim gporca/libgpos/src/common/CStackDescriptor.cpp
- Press i to enter the insert mode and comment out line 167.

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Compile and install GPORCA.
mkdir gporca/build cd gporca/build cmake -GNinja .. ninja install
- Add /usr/local/lib to the /etc/ld.so.conf file.
echo /usr/local/lib >> /etc/ld.so.conf echo /usr/local/lib64 >> /etc/ld.so.conf ldconfig
Parent topic: Configuring the Compilation Environment