ganos.parallel.degree

更新时间:
复制 MD 格式

ganos.parallel.degree — sets the default degree of parallelism for parallel operations in Ganos, the geospatial extension for PolarDB for PostgreSQL.

When a Ganos operation does not explicitly specify parallelism, Ganos uses this variable's value.

Data type

integer

Valid values

1 to 64. Default: 1.

Setting this variable to 1 runs Ganos operations serially (no parallelism). Higher values allow Ganos to use more parallel workers, which can improve throughput for compute-intensive spatial queries.

Usage notes

  • Actual parallelism may be lower than the configured value. The number of workers Ganos can use at runtime is constrained by PostgreSQL-level settings such as max_parallel_workers and max_parallel_workers_per_gather. If fewer workers are available, the operation runs with reduced parallelism.

  • Each parallel worker consumes additional resources. A Ganos operation running with multiple parallel workers consumes more CPU, memory, and I/O than a serial operation. Start with a moderate value (for example, 4) and increase it based on observed query performance and system load.

Examples

Set the degree of parallelism for the current session:

SET ganos.parallel.degree = 4;

Set the default for all new connections to a specific database:

ALTER DATABASE <your_database> SET ganos.parallel.degree = 4;

Reset to the default value:

SET ganos.parallel.degree = DEFAULT;

Related parameters

When tuning ganos.parallel.degree, also consider adjusting these PostgreSQL parameters: