This feature uses the spatial sorting (GiST Sort) method to accelerate index creation. It parallelizes the creation process and significantly reduces disk read and write operations.
Precautions
The spatial sorting method applies only to point data. Using this method for other spatial data types degrades index query performance.
Usage
Note The number of parallel workers and the total worker memory specified in the following command examples are for reference only. You must configure these settings based on your actual requirements.
- Enable the GiST Sort feature.
set polar_enable_gist_sort=on; - Set the number of parallel workers.
A higher number of parallel workers for data table scans increases the CPU load during queries. The number of parallel workers must not exceed the number of physical CPU cores.
set max_parallel_maintenance_workers=4; - Set the total memory for parallel workers. Set the value to at least 1 GB.
set maintenance_work_mem='1GB'; - Create a GiST index.
create index on t using gist(geom); - To disable this feature, run the following command.
set polar_enable_gist_sort=off;
该文章对您有帮助吗?