partition
is recommended for most environments as it only applies to partitioned tables. Set to on
if you have extensive CHECK constraints that could benefit from exclusion. Use off
only if you experience planning overhead or incorrect results, though this is rare.0.1
(10%) is reasonable for many applications. Increase to 0.5-0.8
for applications that typically fetch most cursor rows. Decrease to 0.01-0.05
for applications that rarely fetch beyond the first few rows. Adjust based on your application's actual cursor usage patterns.100
is sufficient for most workloads. Increase to 200-500
for data warehouses with complex analytical queries. For columns with unusual data distributions, use ALTER TABLE SET STATISTICS per-column instead of increasing the global default. Monitor ANALYZE performance after increasing this value.8
provides a good balance. Increase to 12-16
for data warehouse workloads with complex queries to enable more cross-subquery optimization. Decrease to 4-6
if you experience planning regressions with complex subqueries.on
is reasonable for most systems. For OLTP workloads with simple queries, consider setting to off
to avoid JIT overhead. For data warehouses with complex analytical queries, ensure JIT is enabled and consider increasing related JIT parameters for optimal performance.8
is generally effective. Set to 1
if you want to force the planner to use the exact JOIN order specified in your queries. Increase to 12-20
for complex queries to give the planner more optimization flexibility. Use explicit JOIN syntax when you need to control join order precisely.auto
lets the planner choose based on cost estimates. Use force_custom_plan
if parameter values significantly affect optimal plans. Use force_generic_plan
for OLTP workloads with stable plan shapes to avoid planning overhead. Monitor plan quality for prepared statements after changing this setting.10.0
assumes the recursive part will produce about 10 times more rows than the non-recursive part. Increase for queries that typically generate large recursive results. Decrease for queries with limited recursion. Monitor actual versus estimated row counts for your recursive queries and adjust accordingly.Start your journey toward a healthier PostgreSQL with pghealth.
You can explore all features immediately with a free trial β no installation required.
π Start Free Trial