Editorial question38.4K views3,950 votes0 answers1,892 following
AI-generatedPostgreSQL parallel query planner misestimating costs with expression indexes
Parallel Execution and Expression Indexes PostgreSQL 14+ utilizes a cost-based planner to determine if a query should be executed in parallel. This decision depends on the max_parallel_workers_per_gather setting and the estimated cost of a serial plan versus a parallel plan. When queries rely on expression indexes rather than standard B-tree indexes on base