This feature uses the GiST Sort method to parallelize the index creation process, which significantly reduces the read/write operations on disks and accelerates index creation.
The GiST Sort method is only applicable to points. Using this method for other types of spatial data will affect the query performance of indexes.
- Enable the GiST Sort feature.
- Configure the number of parallel workers.
The more parallel workers that you use to scan data tables, the higher the CPU load is during query. Therefore, we recommend that the number of workers you set do not exceed the number of physical CPU cores.
- Configure the total memory usage of parallel workers. This parameter is recommended to be at least 1G.
- Create a GiST index.
create index on t using gist(geom);
- Execute the following statement to disable the Gist Sort feature: